I'm trying to do something a bit non-standard and hoping someone has a 
suggestion.  I'd like to use elements at the top of my JSON document to 
build up objects further down the document.  Here's a contrived example:
{
  "templates": {
    "quadruped": {
      "legs": 4
    },
    "exotherm": {
      "isColdBlooded": true
    },
    "endotherm": {
      "isColdBlooded": false
    }
  },
  "animals": {
    "aligator": {
      "exterior": "scales",
      "templates": [
        "quadruped",
        "exotherm"
      ]
    },
    "cow": {
      "exterior": "fur",
      "templates": [
        "quadruped",
        "endotherm"
      ]
    }
  }
}

What I'm hoping to wind up with is deserialized Aligator & Cow instances 
that have the properties from their templates merged in.  I've played 
around a bit with customer deserializers and contextual deserializers but 
I'm having trouble finding a way to make the templates available to the 
deserializers for Cow & Aligator.

Any suggestions would be greatly appreciated.  Thanks in advance.

-Hob

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To post to this group, send email to jackson-user@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to