@Target(value={ANNOTATION_TYPE,TYPE,FIELD,METHOD,PARAMETER}) @Retention(value=RUNTIME) public @interface JsonIdentityReference
JsonIdentityInfo
).
The main use case is that of enforcing use of Object Id even for the first
time an Object is referenced, instead of first instance being serialized
as full POJO.Modifier and Type | Optional Element and Description |
---|---|
boolean |
alwaysAsId
Marker to indicate whether all referenced values are to
be serialized as ids (true); or by serializing the
first encountered reference as POJO and only then as id (false).
|
public abstract boolean alwaysAsId
Note that if value of 'true' is used, deserialization may require additional contextual information, and possibly using a custom id resolver -- the default handling may not be sufficient.
Copyright © 2012-2014 FasterXML. All Rights Reserved.