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 Sat Apr 25 16:37:31 PDT 2020 -->
6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7<title>JsonIdentityReference (Jackson-annotations 2.11.0 API)</title>
8<meta name="date" content="2020-04-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="JsonIdentityReference (Jackson-annotations 2.11.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/JsonIdentityReference.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/JsonIdentityInfo.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
47<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnore.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
48</ul>
49<ul class="navList">
50<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonIdentityReference.html" target="_top">Frames</a></li>
51<li><a href="JsonIdentityReference.html" target="_top">No&nbsp;Frames</a></li>
52</ul>
53<ul class="navList" id="allclasses_navbar_top">
54<li><a href="../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
71<li>Field&nbsp;|&nbsp;</li>
72<li>Required&nbsp;|&nbsp;</li>
73<li><a href="#annotation.type.optional.element.summary">Optional</a></li>
74</ul>
75<ul class="subNavList">
76<li>Detail:&nbsp;</li>
77<li>Field&nbsp;|&nbsp;</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 JsonIdentityReference" class="title">Annotation Type JsonIdentityReference</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">JsonIdentityReference</span></pre>
99<div class="block">Optional annotation that can be used for customizing details of a reference
100 to Objects for which "Object Identity" is enabled (see <a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html" title="annotation in com.fasterxml.jackson.annotation"><code>JsonIdentityInfo</code></a>).
101 The main use case is that of enforcing use of Object Id even for the first
102 time an Object is referenced, instead of first instance being serialized
103 as full POJO.</div>
104<dl>
105<dt><span class="simpleTagLabel">Since:</span></dt>
106<dd>2.1</dd>
107</dl>
108</li>
109</ul>
110</div>
111<div class="summary">
112<ul class="blockList">
113<li class="blockList">
114<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
115<ul class="blockList">
116<li class="blockList"><a name="annotation.type.optional.element.summary">
117<!--   -->
118</a>
119<h3>Optional Element Summary</h3>
120<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation">
121<caption><span>Optional Elements</span><span class="tabEnd">&nbsp;</span></caption>
122<tr>
123<th class="colFirst" scope="col">Modifier and Type</th>
124<th class="colLast" scope="col">Optional Element and Description</th>
125</tr>
126<tr class="altColor">
127<td class="colFirst"><code>boolean</code></td>
128<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityReference.html#alwaysAsId--">alwaysAsId</a></span></code>
129<div class="block">Marker to indicate whether all referenced values are to
130 be serialized as ids (true); or by serializing the
131 first encountered reference as POJO and only then as id (false).</div>
132</td>
133</tr>
134</table>
135</li>
136</ul>
137</li>
138</ul>
139</div>
140<div class="details">
141<ul class="blockList">
142<li class="blockList">
143<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->
144<ul class="blockList">
145<li class="blockList"><a name="annotation.type.element.detail">
146<!--   -->
147</a>
148<h3>Element Detail</h3>
149<a name="alwaysAsId--">
150<!--   -->
151</a>
152<ul class="blockListLast">
153<li class="blockList">
154<h4>alwaysAsId</h4>
155<pre>public abstract&nbsp;boolean&nbsp;alwaysAsId</pre>
156<div class="block">Marker to indicate whether all referenced values are to
157 be serialized as ids (true); or by serializing the
158 first encountered reference as POJO and only then as id (false).
159<p>
160 Note that if value of 'true' is used, deserialization may require
161 additional contextual information, and possibly using a custom
162 id resolver -- the default handling may not be sufficient.</div>
163<dl>
164<dt><span class="simpleTagLabel">Since:</span></dt>
165<dd>2.1</dd>
166</dl>
167<dl>
168<dt>Default:</dt>
169<dd>false</dd>
170</dl>
171</li>
172</ul>
173</li>
174</ul>
175</li>
176</ul>
177</div>
178</div>
179<!-- ========= END OF CLASS DATA ========= -->
180<!-- ======= START OF BOTTOM NAVBAR ====== -->
181<div class="bottomNav"><a name="navbar.bottom">
182<!--   -->
183</a>
184<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
185<a name="navbar.bottom.firstrow">
186<!--   -->
187</a>
188<ul class="navList" title="Navigation">
189<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li>
190<li class="navBarCell1Rev">Class</li>
191<li><a href="class-use/JsonIdentityReference.html">Use</a></li>
192<li><a href="package-tree.html">Tree</a></li>
193<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
194<li><a href="../../../../index-all.html">Index</a></li>
195<li><a href="../../../../help-doc.html">Help</a></li>
196</ul>
197</div>
198<div class="subNav">
199<ul class="navList">
200<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
201<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnore.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
202</ul>
203<ul class="navList">
204<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonIdentityReference.html" target="_top">Frames</a></li>
205<li><a href="JsonIdentityReference.html" target="_top">No&nbsp;Frames</a></li>
206</ul>
207<ul class="navList" id="allclasses_navbar_bottom">
208<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
209</ul>
210<div>
211<script type="text/javascript"><!--
212  allClassesLink = document.getElementById("allclasses_navbar_bottom");
213  if(window==top) {
214    allClassesLink.style.display = "block";
215  }
216  else {
217    allClassesLink.style.display = "none";
218  }
219  //-->
220</script>
221</div>
222<div>
223<ul class="subNavList">
224<li>Summary:&nbsp;</li>
225<li>Field&nbsp;|&nbsp;</li>
226<li>Required&nbsp;|&nbsp;</li>
227<li><a href="#annotation.type.optional.element.summary">Optional</a></li>
228</ul>
229<ul class="subNavList">
230<li>Detail:&nbsp;</li>
231<li>Field&nbsp;|&nbsp;</li>
232<li><a href="#annotation.type.element.detail">Element</a></li>
233</ul>
234</div>
235<a name="skip.navbar.bottom">
236<!--   -->
237</a></div>
238<!-- ======== END OF BOTTOM NAVBAR ======= -->
239<p class="legalCopy"><small>Copyright &#169; 2008&#x2013;2020 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p>
240</body>
241</html>
242