Hacker News new | past | comments | ask | show | jobs | submit login

JSON has its strengths and weaknesses, and while Java doesn't have first class support for it the Jackson libraries are excellent!



Unfortunately given that java does type erasure, you don't get the kind of full featured JSON lib that Json.Net is in the .NET world. Presumably you'd have to somehow annotate to the deserializer what each individual list/array's generic type is for it to properly deserialize, separate from the type definition itself.


I'm not sure what scenario you are envisioning. Type erasure does not completely eradicate generic type information, reflection can still be used to infer generic usage for deserialization and dependency injection (and is done in Jackson and Spring). To make your life easier in doing so, there is:

https://github.com/jhalterman/typetools




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: