java - Mapping freeform XML/JSON to Moxy/JAXB annotated class -
i'm trying find way correctly map following xml/json document equivalent jaxb/moxy annotated class . note model element of document, in example describes person, freeform , i.e. might any kind of xml element/json object , not statically known. xml document: <form> <title>person form</title> <model> <person> <name>john</name> <surname>smith</surname> <address> <street>main st.</street> <city>ny</city> <country>usa</country> </address> <person> </model> </form> equivalent json document: { "title":"form title", "model":{ "person":{ "name":"john", "surname":"smith", "address":{ "street":"main st....