Top Description Methods
com.fasterxml.jackson.annotation

public @Interface JsonIdentityReference

extends Annotation
Annotations
@Target:ANNOTATION_TYPE, TYPE, FIELD, METHOD, PARAMETER
@Retention:RUNTIME
@JacksonAnnotation
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

Optional annotation that can be used for customizing details of a reference to Objects for which "Object Identity" is enabled (see 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.
Since
2.1

Method Summary

Modifier and TypeMethod and Description
public 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).

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

alwaysAsIdback to summary
public 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).

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.

Since
2.1