0

Using Jersey and MOXy to build a RESTful client, I'm stuck on how to handle mapping to an entity/class where the JSON message has variable and unpredictable properties in it.

I would love if I could simply have an entity to how a framework like Documentum's DFC had IDFTypedObject. Boy that'd be nice to work with. That or just a way to suck everything into a Map of maps or something...

I've been searching around, but just either don't understand what I've found, or maybe this specific thing doesn't happen much...? If someone could point me into the right terminology and direction, I'd be super grateful!

A possible response body may come in as follows...any number, and any type of properties is possible under "properties":

{
    "response": "All Good, Darling",
    "properties": {
        "property1": {
            "stuff": [],
            "goodies": []
        },
        "property4": 63473,
        "property5": "Draft",
        "property6": [
            "1341340696280",
            "23523525",
            "32424",
            "22362626262626"
        ]
}
jeremy simon
  • 601
  • 1
  • 8
  • 19

0 Answers0