1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!-- NewPage --> 3<html lang="en"> 4<head> 5<!-- Generated by javadoc (1.8.0_162) on Wed Sep 25 19:26:34 PDT 2019 --> 6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<title>JsonIdentityInfo (Jackson-annotations 2.10.0 API)</title> 8<meta name="date" content="2019-09-25"> 9<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> 10<script type="text/javascript" src="../../../../script.js"></script> 11</head> 12<body> 13<script type="text/javascript"><!-- 14 try { 15 if (location.href.indexOf('is-external=true') == -1) { 16 parent.document.title="JsonIdentityInfo (Jackson-annotations 2.10.0 API)"; 17 } 18 } 19 catch(err) { 20 } 21//--> 22</script> 23<noscript> 24<div>JavaScript is disabled on your browser.</div> 25</noscript> 26<!-- ========= START OF TOP NAVBAR ======= --> 27<div class="topNav"><a name="navbar.top"> 28<!-- --> 29</a> 30<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> 31<a name="navbar.top.firstrow"> 32<!-- --> 33</a> 34<ul class="navList" title="Navigation"> 35<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 36<li class="navBarCell1Rev">Class</li> 37<li><a href="class-use/JsonIdentityInfo.html">Use</a></li> 38<li><a href="package-tree.html">Tree</a></li> 39<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 40<li><a href="../../../../index-all.html">Index</a></li> 41<li><a href="../../../../help-doc.html">Help</a></li> 42</ul> 43</div> 44<div class="subNav"> 45<ul class="navList"> 46<li><a href="../../../../com/fasterxml/jackson/annotation/JsonGetter.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Prev Class</span></a></li> 47<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityReference.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Next Class</span></a></li> 48</ul> 49<ul class="navList"> 50<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonIdentityInfo.html" target="_top">Frames</a></li> 51<li><a href="JsonIdentityInfo.html" target="_top">No Frames</a></li> 52</ul> 53<ul class="navList" id="allclasses_navbar_top"> 54<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 55</ul> 56<div> 57<script type="text/javascript"><!-- 58 allClassesLink = document.getElementById("allclasses_navbar_top"); 59 if(window==top) { 60 allClassesLink.style.display = "block"; 61 } 62 else { 63 allClassesLink.style.display = "none"; 64 } 65 //--> 66</script> 67</div> 68<div> 69<ul class="subNavList"> 70<li>Summary: </li> 71<li>Field | </li> 72<li><a href="#annotation.type.required.element.summary">Required</a> | </li> 73<li><a href="#annotation.type.optional.element.summary">Optional</a></li> 74</ul> 75<ul class="subNavList"> 76<li>Detail: </li> 77<li>Field | </li> 78<li><a href="#annotation.type.element.detail">Element</a></li> 79</ul> 80</div> 81<a name="skip.navbar.top"> 82<!-- --> 83</a></div> 84<!-- ========= END OF TOP NAVBAR ========= --> 85<!-- ======== START OF CLASS DATA ======== --> 86<div class="header"> 87<div class="subTitle">com.fasterxml.jackson.annotation</div> 88<h2 title="Annotation Type JsonIdentityInfo" class="title">Annotation Type JsonIdentityInfo</h2> 89</div> 90<div class="contentContainer"> 91<div class="description"> 92<ul class="blockList"> 93<li class="blockList"> 94<hr> 95<br> 96<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true" title="class or interface in java.lang.annotation">@Target</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>={<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#ANNOTATION_TYPE" title="class or interface in java.lang.annotation">ANNOTATION_TYPE</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#TYPE" title="class or interface in java.lang.annotation">TYPE</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#FIELD" title="class or interface in java.lang.annotation">FIELD</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#METHOD" title="class or interface in java.lang.annotation">METHOD</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#PARAMETER" title="class or interface in java.lang.annotation">PARAMETER</a>}) 97 <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true" title="class or interface in java.lang.annotation">@Retention</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>=<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="class or interface in java.lang.annotation">RUNTIME</a>) 98public @interface <span class="memberNameLabel">JsonIdentityInfo</span></pre> 99<div class="block">Annotation used for indicating that values of annotated type 100 or property should be serializing so that instances either 101 contain additional object identifier (in addition actual object 102 properties), or as a reference that consists of an object id 103 that refers to a full serialization. In practice this is done 104 by serializing the first instance as full object and object 105 identity, and other references to the object as reference values. 106<p> 107 There are two main approaches to generating object identifier: 108 either using a generator (either one of standard ones, or a custom 109 generator), or using a value of a property. The latter case is 110 indicated by using a placeholder generator marker 111 <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.PropertyGenerator.html" title="class in com.fasterxml.jackson.annotation"><code>ObjectIdGenerators.PropertyGenerator</code></a>; former by using explicit generator. 112 Object id has to be serialized as a property in case of POJOs; 113 object identity is currently NOT support for JSON Array types 114 (Java arrays or Lists) or Java Map types. 115<p> 116 Finally, note that generator type of <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.None.html" title="class in com.fasterxml.jackson.annotation"><code>ObjectIdGenerators.None</code></a> 117 indicates that no Object Id should be included or used: it is included 118 to allow suppressing Object Ids using mix-in annotations.</div> 119<dl> 120<dt><span class="simpleTagLabel">Since:</span></dt> 121<dd>2.0</dd> 122</dl> 123</li> 124</ul> 125</div> 126<div class="summary"> 127<ul class="blockList"> 128<li class="blockList"> 129<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== --> 130<ul class="blockList"> 131<li class="blockList"><a name="annotation.type.required.element.summary"> 132<!-- --> 133</a> 134<h3>Required Element Summary</h3> 135<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Required Element Summary table, listing required elements, and an explanation"> 136<caption><span>Required Elements</span><span class="tabEnd"> </span></caption> 137<tr> 138<th class="colFirst" scope="col">Modifier and Type</th> 139<th class="colLast" scope="col">Required Element and Description</th> 140</tr> 141<tr class="altColor"> 142<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator</a><?>></code></td> 143<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#generator--">generator</a></span></code> 144<div class="block">Generator to use for producing Object Identifier for objects: 145 either one of pre-defined generators from 146 <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation"><code>ObjectIdGenerator</code></a>, or a custom generator.</div> 147</td> 148</tr> 149</table> 150</li> 151</ul> 152<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 153<ul class="blockList"> 154<li class="blockList"><a name="annotation.type.optional.element.summary"> 155<!-- --> 156</a> 157<h3>Optional Element Summary</h3> 158<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> 159<caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> 160<tr> 161<th class="colFirst" scope="col">Modifier and Type</th> 162<th class="colLast" scope="col">Optional Element and Description</th> 163</tr> 164<tr class="altColor"> 165<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> 166<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#property--">property</a></span></code> 167<div class="block">Name of JSON property in which Object Id will reside: also, 168 if "from property" marker generator is used, identifies 169 property that will be accessed to get type id.</div> 170</td> 171</tr> 172<tr class="rowColor"> 173<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdResolver.html" title="interface in com.fasterxml.jackson.annotation">ObjectIdResolver</a>></code></td> 174<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#resolver--">resolver</a></span></code> 175<div class="block">Resolver to use for producing POJO from Object Identifier.</div> 176</td> 177</tr> 178<tr class="altColor"> 179<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?></code></td> 180<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#scope--">scope</a></span></code> 181<div class="block">Scope is used to define applicability of an Object Id: all ids 182 must be unique within their scope; where scope is defined 183 as combination of this value and generator type.</div> 184</td> 185</tr> 186</table> 187</li> 188</ul> 189</li> 190</ul> 191</div> 192<div class="details"> 193<ul class="blockList"> 194<li class="blockList"> 195<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 196<ul class="blockList"> 197<li class="blockList"><a name="annotation.type.element.detail"> 198<!-- --> 199</a> 200<h3>Element Detail</h3> 201<a name="generator--"> 202<!-- --> 203</a> 204<ul class="blockListLast"> 205<li class="blockList"> 206<h4>generator</h4> 207<pre>public abstract <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator</a><?>> generator</pre> 208<div class="block">Generator to use for producing Object Identifier for objects: 209 either one of pre-defined generators from 210 <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation"><code>ObjectIdGenerator</code></a>, or a custom generator. 211 Defined as class to instantiate. 212<p> 213 Note that special type 214 <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.None.html" title="class in com.fasterxml.jackson.annotation"><code>ObjectIdGenerators.None</code></a> 215 can be used to disable inclusion of Object Ids.</div> 216</li> 217</ul> 218</li> 219</ul> 220<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 221<ul class="blockList"> 222<li class="blockList"><a name="property--"> 223<!-- --> 224</a> 225<ul class="blockList"> 226<li class="blockList"> 227<h4>property</h4> 228<pre>public abstract <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> property</pre> 229<div class="block">Name of JSON property in which Object Id will reside: also, 230 if "from property" marker generator is used, identifies 231 property that will be accessed to get type id. 232 If a property is used, name must match its external 233 name (one defined by annotation, or derived from accessor 234 name as per Java Bean Introspection rules). 235<p> 236 Default value is <code>@id</code>.</div> 237<dl> 238<dt>Default:</dt> 239<dd>"@id"</dd> 240</dl> 241</li> 242</ul> 243</li> 244</ul> 245<ul class="blockList"> 246<li class="blockList"><a name="resolver--"> 247<!-- --> 248</a> 249<ul class="blockList"> 250<li class="blockList"> 251<h4>resolver</h4> 252<pre>public abstract <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdResolver.html" title="interface in com.fasterxml.jackson.annotation">ObjectIdResolver</a>> resolver</pre> 253<div class="block">Resolver to use for producing POJO from Object Identifier. 254 <p> 255 Default value is <a href="../../../../com/fasterxml/jackson/annotation/SimpleObjectIdResolver.html" title="class in com.fasterxml.jackson.annotation"><code>SimpleObjectIdResolver</code></a></div> 256<dl> 257<dt><span class="simpleTagLabel">Since:</span></dt> 258<dd>2.4</dd> 259</dl> 260<dl> 261<dt>Default:</dt> 262<dd>com.fasterxml.jackson.annotation.SimpleObjectIdResolver.class</dd> 263</dl> 264</li> 265</ul> 266</li> 267</ul> 268<ul class="blockList"> 269<li class="blockList"><a name="scope--"> 270<!-- --> 271</a> 272<ul class="blockListLast"> 273<li class="blockList"> 274<h4>scope</h4> 275<pre>public abstract <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> scope</pre> 276<div class="block">Scope is used to define applicability of an Object Id: all ids 277 must be unique within their scope; where scope is defined 278 as combination of this value and generator type. 279 Comparison is simple equivalence, meaning that both type 280 generator type and scope class must be the same. 281<p> 282 Scope is used for determining how many generators are needed; 283 more than one scope is typically only needed if external Object Ids 284 have overlapping value domains (i.e. are only unique within some 285 limited scope)</div> 286<dl> 287<dt>Default:</dt> 288<dd>java.lang.Object.class</dd> 289</dl> 290</li> 291</ul> 292</li> 293</ul> 294</li> 295</ul> 296</div> 297</div> 298<!-- ========= END OF CLASS DATA ========= --> 299<!-- ======= START OF BOTTOM NAVBAR ====== --> 300<div class="bottomNav"><a name="navbar.bottom"> 301<!-- --> 302</a> 303<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> 304<a name="navbar.bottom.firstrow"> 305<!-- --> 306</a> 307<ul class="navList" title="Navigation"> 308<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 309<li class="navBarCell1Rev">Class</li> 310<li><a href="class-use/JsonIdentityInfo.html">Use</a></li> 311<li><a href="package-tree.html">Tree</a></li> 312<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 313<li><a href="../../../../index-all.html">Index</a></li> 314<li><a href="../../../../help-doc.html">Help</a></li> 315</ul> 316</div> 317<div class="subNav"> 318<ul class="navList"> 319<li><a href="../../../../com/fasterxml/jackson/annotation/JsonGetter.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Prev Class</span></a></li> 320<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityReference.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Next Class</span></a></li> 321</ul> 322<ul class="navList"> 323<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonIdentityInfo.html" target="_top">Frames</a></li> 324<li><a href="JsonIdentityInfo.html" target="_top">No Frames</a></li> 325</ul> 326<ul class="navList" id="allclasses_navbar_bottom"> 327<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 328</ul> 329<div> 330<script type="text/javascript"><!-- 331 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 332 if(window==top) { 333 allClassesLink.style.display = "block"; 334 } 335 else { 336 allClassesLink.style.display = "none"; 337 } 338 //--> 339</script> 340</div> 341<div> 342<ul class="subNavList"> 343<li>Summary: </li> 344<li>Field | </li> 345<li><a href="#annotation.type.required.element.summary">Required</a> | </li> 346<li><a href="#annotation.type.optional.element.summary">Optional</a></li> 347</ul> 348<ul class="subNavList"> 349<li>Detail: </li> 350<li>Field | </li> 351<li><a href="#annotation.type.element.detail">Element</a></li> 352</ul> 353</div> 354<a name="skip.navbar.bottom"> 355<!-- --> 356</a></div> 357<!-- ======== END OF BOTTOM NAVBAR ======= --> 358<p class="legalCopy"><small>Copyright © 2008–2019 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p> 359</body> 360</html> 361