Use collection generic type to create nested beans
Brought to you by:
aalmiray
The current implementation seems to be lacking in terms of support for generics. By examining the collection's generic type, you can determine the type of objects it contains. This makes setting the explicit attribute classtype in the classmap unnecessary.
I've attached a zip containing a patch to JSONObject.java to do this for Lists and Maps. It also contains 2 JUnit tests to demonstrate the problem and fix.
Fix to
Logged In: YES
user_id=1192026
Originator: NO
Thanks Paul, we'll review the patch.
The reason why generics are not yet supported is that all previously submitted patches (3 so far) only cover the basic behavior, i.e, one dimensional generics, List<T> and Map<K,V> rather than Map<String,List<List<T>>>
- Andres