com.fasterxml.jackson.annotation.JsonIdentityReference Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redisson-all Show documentation
Show all versions of redisson-all Show documentation
Easy Redis Java client and Real-Time Data Platform. Valkey compatible. Sync/Async/RxJava3/Reactive API. Client side caching. Over 50 Redis based Java objects and services: JCache API, Apache Tomcat, Hibernate, Spring, Set, Multimap, SortedSet, Map, List, Queue, Deque, Semaphore, Lock, AtomicLong, Map Reduce, Bloom filter, Scheduler, RPC
package com.fasterxml.jackson.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Optional annotation that can be used for customizing details of a reference
* to Objects for which "Object Identity" is enabled (see {@link 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
*/
@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE,
ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotation
public @interface JsonIdentityReference
{
/**
* 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
*/
public boolean alwaysAsId() default false;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy