users@jersey.java.net

[Jersey] Nested objects with Jersey/JSON

From: William Todd <william_at_nutmeg.co.uk>
Date: Wed, 24 Aug 2011 22:10:02 +0100

We have been looking at using JSON to provide a REST service in our
application
This seems to work fine for a top level object with collections of child
objects to one level - but we cannot see how to serialise an object graph
which is more that 2-levels deep

For example we can get:

{"level0": {
  "uuid": "123",
  "level1": {
    "uuid": "456"
  }
}

But not

{"level0": {
  "uuid": "123",
  "level1": {
    "uuid": "456",
    "level2":{
      "uuid":789"
    }
  }
}
Is this a matter of configuration or is it simply not supported?


-- 
William Todd