Hi,

I have a model where some class attributes are concrete/final and other are 
generic, I want to avoid adding the @type to the concrete/final. Here is an 
example:

class Action {

   DvTime time;
}

class Element {

   Object value;
}

final class DvTime {

  ...
}

We could do:

Element e = new Element();
e.setValue(new DvTime(...));

Action a = new Action();
a.setTime(new DvTime(...));


When those objects are serialized, I need:

{
  @type: Element,
  value: {
    @type: DvTime,
    ...
  }
}

{
  @type: Action,
  time: {
    ...
  }
}

That avoids adding the @type = DvTime for action.time because by the model 
I know that always be a DvTime.

Is that possible? Thanks!

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/2c05ae72-2f11-46bf-b7c6-d20ba3f866db%40googlegroups.com.

Reply via email to