Announcement Announcement Module
No announcement yet.
REST Web Service - JSON with $ref node Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • REST Web Service - JSON with $ref node

    Hello all,

    I'm doing a client implementation of a REST service on Spring Framework 3.2 with Jackson 2.1.3.

    Until now i could solve all the problems either by recurring to this forum or in Jackson specification. The problem began when an update to the server implementation was done in order to shring (even more ) the json message size. They began to use object references to duplicated entries in arrays. I will post a simple example of the following message format was used:

    Consider the data model as the following:
    @JsonIdentityInfo(generator=ObjectIdGenerators.Int SequenceGenerator.class, property="$id")
    public class TypeW implements ITypeW {

    @JsonProperty(required=true, value="Name")
    protected String name;
    I've seen examples of this working without that "$ref" entry and I'm wondering if I can customize or implement a specific deserializer in order to achieve the same result with the format that I've posted above.
    Last edited by ricardo.leal; Jan 28th, 2013, 01:16 PM. Reason: tipo