Generics support is planned for 2.3 (no release date yet). We have received 2 different patches so far, with 2 different approaches but they do not solve the whole picture, as deeply nested generics info in Lists is not taken into account. This means you can't write the following at the moment
List<Map<Integer,String>> list = JSONSerializer.toJava( json );
but
List<Map> list = JSONSerializer.toJava( json );
Patches are welcome =)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For my selfish needs, I would only need basic generics support, i.e. lists and maps of primitive types.
For the big picture, how about using the Type abstraction instead of Class? This way you could extract arbitrarily nested generics info at any point in the implementation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
When is generics support going to be available?
I managed to change the source code to get it working for now, but i'd rather use a stable release in production.
If this isn't possible, I may have to consider another library.
Peter,
Generics support is planned for 2.3 (no release date yet). We have received 2 different patches so far, with 2 different approaches but they do not solve the whole picture, as deeply nested generics info in Lists is not taken into account. This means you can't write the following at the moment
List<Map<Integer,String>> list = JSONSerializer.toJava( json );
but
List<Map> list = JSONSerializer.toJava( json );
Patches are welcome =)
For my selfish needs, I would only need basic generics support, i.e. lists and maps of primitive types.
For the big picture, how about using the Type abstraction instead of Class? This way you could extract arbitrarily nested generics info at any point in the implementation.