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 (version 1.7.0_25) on Thu May 29 09:45:52 PDT 2014 -->
6<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
7<title>JsonProperty (Jackson-annotations 2.4.0 API)</title>
8<meta name="date" content="2014-05-29">
9<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
10</head>
11<body>
12<script type="text/javascript"><!--
13    if (location.href.indexOf('is-external=true') == -1) {
14        parent.document.title="JsonProperty (Jackson-annotations 2.4.0 API)";
15    }
16//-->
17</script>
18<noscript>
19<div>JavaScript is disabled on your browser.</div>
20</noscript>
21<!-- ========= START OF TOP NAVBAR ======= -->
22<div class="topNav"><a name="navbar_top">
23<!--   -->
24</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
25<!--   -->
26</a>
27<ul class="navList" title="Navigation">
28<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li>
29<li class="navBarCell1Rev">Class</li>
30<li><a href="class-use/JsonProperty.html">Use</a></li>
31<li><a href="package-tree.html">Tree</a></li>
32<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
33<li><a href="../../../../index-all.html">Index</a></li>
34<li><a href="../../../../help-doc.html">Help</a></li>
35</ul>
36</div>
37<div class="subNav">
38<ul class="navList">
39<li><a href="../../../../com/fasterxml/jackson/annotation/JsonManagedReference.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li>
40<li><a href="../../../../com/fasterxml/jackson/annotation/JsonPropertyDescription.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li>
41</ul>
42<ul class="navList">
43<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonProperty.html" target="_top">Frames</a></li>
44<li><a href="JsonProperty.html" target="_top">No Frames</a></li>
45</ul>
46<ul class="navList" id="allclasses_navbar_top">
47<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
48</ul>
49<div>
50<script type="text/javascript"><!--
51  allClassesLink = document.getElementById("allclasses_navbar_top");
52  if(window==top) {
53    allClassesLink.style.display = "block";
54  }
55  else {
56    allClassesLink.style.display = "none";
57  }
58  //-->
59</script>
60</div>
61<div>
62<ul class="subNavList">
63<li>Summary:&nbsp;</li>
64<li>Required&nbsp;|&nbsp;</li>
65<li><a href="#annotation_type_optional_element_summary">Optional</a></li>
66</ul>
67<ul class="subNavList">
68<li>Detail:&nbsp;</li>
69<li><a href="#annotation_type_element_detail">Element</a></li>
70</ul>
71</div>
72<a name="skip-navbar_top">
73<!--   -->
74</a></div>
75<!-- ========= END OF TOP NAVBAR ========= -->
76<!-- ======== START OF CLASS DATA ======== -->
77<div class="header">
78<div class="subTitle">com.fasterxml.jackson.annotation</div>
79<h2 title="Annotation Type JsonProperty" class="title">Annotation Type JsonProperty</h2>
80</div>
81<div class="contentContainer">
82<div class="description">
83<ul class="blockList">
84<li class="blockList">
85<hr>
86<br>
87<pre><a href="http://download.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="http://download.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="http://download.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="http://download.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="http://download.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="http://download.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>})
88<a href="http://download.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="http://download.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="http://download.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>)
89public @interface <span class="strong">JsonProperty</span></pre>
90<div class="block">Marker annotation that can be used to define a non-static
91 method as a "setter" or "getter" for a logical property
92 (depending on its signature),
93 or non-static object field to be used (serialized, deserialized) as
94 a logical property.
95<p>
96 Default value ("") indicates that the field name is used
97 as the property name without any modifications, but it
98 can be specified to non-empty value to specify different
99 name. Property name refers to name used externally, as
100 the field name in JSON objects.</div>
101</li>
102</ul>
103</div>
104<div class="summary">
105<ul class="blockList">
106<li class="blockList">
107<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
108<ul class="blockList">
109<li class="blockList"><a name="annotation_type_optional_element_summary">
110<!--   -->
111</a>
112<h3>Optional Element Summary</h3>
113<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation">
114<caption><span>Optional Elements</span><span class="tabEnd">&nbsp;</span></caption>
115<tr>
116<th class="colFirst" scope="col">Modifier and Type</th>
117<th class="colLast" scope="col">Optional Element and Description</th>
118</tr>
119<tr class="altColor">
120<td class="colFirst"><code>int</code></td>
121<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonProperty.html#index()">index</a></strong></code>
122<div class="block">Property that indicates numerical index of this property (relative
123 to other properties specified for the Object).</div>
124</td>
125</tr>
126<tr class="rowColor">
127<td class="colFirst"><code>boolean</code></td>
128<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonProperty.html#required()">required</a></strong></code>
129<div class="block">Property that indicates whether a value (which may be explicit
130 null) is expected for property during deserialization or not.</div>
131</td>
132</tr>
133<tr class="altColor">
134<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
135<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonProperty.html#value()">value</a></strong></code>
136<div class="block">Defines name of the logical property, i.e.</div>
137</td>
138</tr>
139</table>
140</li>
141</ul>
142</li>
143</ul>
144</div>
145<div class="details">
146<ul class="blockList">
147<li class="blockList">
148<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->
149<ul class="blockList">
150<li class="blockList"><a name="annotation_type_element_detail">
151<!--   -->
152</a>
153<h3>Element Detail</h3>
154<a name="value()">
155<!--   -->
156</a>
157<ul class="blockList">
158<li class="blockList">
159<h4>value</h4>
160<pre>public abstract&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;value</pre>
161<div class="block">Defines name of the logical property, i.e. JSON object field
162 name to use for the property. If value is empty String (which is the
163 default), will try to use name of the field that is annotated.
164 Note that there is
165 <b>no default name available for constructor arguments</b>,
166 meaning that
167 <b>Empty String is not a valid value for constructor arguments</b>.</div>
168<dl>
169<dt>Default:</dt>
170<dd>""</dd>
171</dl>
172</li>
173</ul>
174<a name="required()">
175<!--   -->
176</a>
177<ul class="blockList">
178<li class="blockList">
179<h4>required</h4>
180<pre>public abstract&nbsp;boolean&nbsp;required</pre>
181<div class="block">Property that indicates whether a value (which may be explicit
182 null) is expected for property during deserialization or not.
183 If expected, <code>BeanDeserialized</code> should indicate
184 this as a validity problem (usually by throwing an exception,
185 but this may be sent via problem handlers that can try to
186 rectify the problem, for example, by supplying a default
187 value).
188<p>
189 Note that as of 2.0, this property is NOT used by
190 <code>BeanDeserializer</code>: support is expected to be
191 added for a later minor version.</div>
192<dl><dt><span class="strong">Since:</span></dt>
193  <dd>2.0</dd></dl>
194<dl>
195<dt>Default:</dt>
196<dd>false</dd>
197</dl>
198</li>
199</ul>
200<a name="index()">
201<!--   -->
202</a>
203<ul class="blockListLast">
204<li class="blockList">
205<h4>index</h4>
206<pre>public abstract&nbsp;int&nbsp;index</pre>
207<div class="block">Property that indicates numerical index of this property (relative
208 to other properties specified for the Object). This index
209 is typically used by binary formats, but may also be useful
210 for schema languages and other tools.</div>
211<dl><dt><span class="strong">Since:</span></dt>
212  <dd>2.4</dd></dl>
213<dl>
214<dt>Default:</dt>
215<dd>-1</dd>
216</dl>
217</li>
218</ul>
219</li>
220</ul>
221</li>
222</ul>
223</div>
224</div>
225<!-- ========= END OF CLASS DATA ========= -->
226<!-- ======= START OF BOTTOM NAVBAR ====== -->
227<div class="bottomNav"><a name="navbar_bottom">
228<!--   -->
229</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
230<!--   -->
231</a>
232<ul class="navList" title="Navigation">
233<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li>
234<li class="navBarCell1Rev">Class</li>
235<li><a href="class-use/JsonProperty.html">Use</a></li>
236<li><a href="package-tree.html">Tree</a></li>
237<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
238<li><a href="../../../../index-all.html">Index</a></li>
239<li><a href="../../../../help-doc.html">Help</a></li>
240</ul>
241</div>
242<div class="subNav">
243<ul class="navList">
244<li><a href="../../../../com/fasterxml/jackson/annotation/JsonManagedReference.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li>
245<li><a href="../../../../com/fasterxml/jackson/annotation/JsonPropertyDescription.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li>
246</ul>
247<ul class="navList">
248<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonProperty.html" target="_top">Frames</a></li>
249<li><a href="JsonProperty.html" target="_top">No Frames</a></li>
250</ul>
251<ul class="navList" id="allclasses_navbar_bottom">
252<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
253</ul>
254<div>
255<script type="text/javascript"><!--
256  allClassesLink = document.getElementById("allclasses_navbar_bottom");
257  if(window==top) {
258    allClassesLink.style.display = "block";
259  }
260  else {
261    allClassesLink.style.display = "none";
262  }
263  //-->
264</script>
265</div>
266<div>
267<ul class="subNavList">
268<li>Summary:&nbsp;</li>
269<li>Required&nbsp;|&nbsp;</li>
270<li><a href="#annotation_type_optional_element_summary">Optional</a></li>
271</ul>
272<ul class="subNavList">
273<li>Detail:&nbsp;</li>
274<li><a href="#annotation_type_element_detail">Element</a></li>
275</ul>
276</div>
277<a name="skip-navbar_bottom">
278<!--   -->
279</a></div>
280<!-- ======== END OF BOTTOM NAVBAR ======= -->
281<p class="legalCopy"><small>Copyright &#169; 2014 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p>
282</body>
283</html>
284