So my code is a client of an api, the data is returned as xml and Ive been able to create valid xsd file from some examples of that xml and then generate some JAXB classes from the schema so my code can now load and work with the xml data without ever having to work directly with Xml.
But unfortunately in the latest version of the api they have dropped xml support and only return json. Is there a json process I can do analogous to my xml process ?
If its not possible from a schema are there solutions so that if I manually create my json classes, I can them use them to automatically martial in raw json data, so at least I only have to deal with json once.
EDIT:Maybe https://github.com/ko5tik/jsonserializer would be useful
UPDATE:FYI so I looked at jsonschema2pojo but that only creates pojos from a schema, and I didnt actually have a json schema, just the actual json. I had a go at creating a schema from the example json I had but didnt get it working for al but the simplest example.
I then looked at http://wiki.fasterxml.com/JacksonInFiveMinutes , Jackson would have been able to use the pojos created by jsonschema2pojo if Id managed to get it working. So I then tried following the example and created a POJO based on the json data I had and it was quite easy, then I then tried full data binding using this and it worked first time.
So in summary Im going to use Jackson for dealing with json returned by the webservice, I'll have to manually create a POJO for each entity but at least it works.