Re:The melting pot of JavaScript (2017)
by Traubenfuchs on Wednesday January 09, 2019 @03:04AM
(#18863119)
Instead of using a typed POJO you can deserialize/serialize a Map<String, Object>.
You could also use a POJO for the fields you know and put a map inside for the fields you don't know.
If that's not enough you can use JsonNode, or ObjectNode where you can freely add and remove json values.
Re:The melting pot of JavaScript (2017)
by sonnyblarney on Wednesday January 09, 2019 @08:39AM
(#18864559)
Ok, touché, good point.
In Java, you have to abstract the document and write a lot of code to access, add, remove things etc. - or - because there is no such thing as an untyped POJO in java, you have to set up a ton of things if you want to use real objects.