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_79) on Thu Jul 07 10:49:27 PDT 2016 --> 6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<title>JsonPropertyOrder (Jackson-annotations 2.8.0 API)</title> 8<meta name="date" content="2016-07-07"> 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="JsonPropertyOrder (Jackson-annotations 2.8.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/JsonPropertyOrder.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/JsonPropertyDescription.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 40<li><a href="../../../../com/fasterxml/jackson/annotation/JsonRawValue.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/JsonPropertyOrder.html" target="_top">Frames</a></li> 44<li><a href="JsonPropertyOrder.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: </li> 64<li>Required | </li> 65<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 66</ul> 67<ul class="subNavList"> 68<li>Detail: </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 JsonPropertyOrder" class="title">Annotation Type JsonPropertyOrder</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://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="http://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="http://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="http://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="http://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="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#CONSTRUCTOR" title="class or interface in java.lang.annotation">CONSTRUCTOR</a>,<a href="http://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>}) 88<a href="http://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="http://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="http://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>) 89public @interface <span class="strong">JsonPropertyOrder</span></pre> 90<div class="block">Annotation that can be used to define ordering (possibly partial) to use 91 when serializing object properties. Properties included in annotation 92 declaration will be serialized first (in defined order), followed by 93 any properties not included in the definition. 94 Annotation definition will override any implicit orderings (such as 95 guarantee that Creator-properties are serialized before non-creator 96 properties) 97<p> 98 Examples: 99<pre> 100 // ensure that "id" and "name" are output before other properties 101 @JsonPropertyOrder({ "id", "name" }) 102 // order any properties that don't have explicit setting using alphabetic order 103 @JsonPropertyOrder(alphabetic=true) 104</pre> 105<p> 106 This annotation may or may not have effect on deserialization: for basic JSON 107 handling there is no effect, but for other supported data types (or structural 108 conventions) there may be. 109<p> 110 NOTE: annotation is allowed for properties, starting with 2.4, mostly to support 111 alphabetic ordering of <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> entries.</div> 112</li> 113</ul> 114</div> 115<div class="summary"> 116<ul class="blockList"> 117<li class="blockList"> 118<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 119<ul class="blockList"> 120<li class="blockList"><a name="annotation_type_optional_element_summary"> 121<!-- --> 122</a> 123<h3>Optional Element Summary</h3> 124<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> 125<caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> 126<tr> 127<th class="colFirst" scope="col">Modifier and Type</th> 128<th class="colLast" scope="col">Optional Element and Description</th> 129</tr> 130<tr class="altColor"> 131<td class="colFirst"><code>boolean</code></td> 132<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonPropertyOrder.html#alphabetic()">alphabetic</a></strong></code> 133<div class="block">Property that defines what to do regarding ordering of properties 134 not explicitly included in annotation instance.</div> 135</td> 136</tr> 137<tr class="rowColor"> 138<td class="colFirst"><code><a href="http://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> 139<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonPropertyOrder.html#value()">value</a></strong></code> 140<div class="block">Order in which properties of annotated object are to be serialized in.</div> 141</td> 142</tr> 143</table> 144</li> 145</ul> 146</li> 147</ul> 148</div> 149<div class="details"> 150<ul class="blockList"> 151<li class="blockList"> 152<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 153<ul class="blockList"> 154<li class="blockList"><a name="annotation_type_element_detail"> 155<!-- --> 156</a> 157<h3>Element Detail</h3> 158<a name="value()"> 159<!-- --> 160</a> 161<ul class="blockList"> 162<li class="blockList"> 163<h4>value</h4> 164<pre>public abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] value</pre> 165<div class="block">Order in which properties of annotated object are to be serialized in.</div> 166<dl> 167<dt>Default:</dt> 168<dd>{}</dd> 169</dl> 170</li> 171</ul> 172<a name="alphabetic()"> 173<!-- --> 174</a> 175<ul class="blockListLast"> 176<li class="blockList"> 177<h4>alphabetic</h4> 178<pre>public abstract boolean alphabetic</pre> 179<div class="block">Property that defines what to do regarding ordering of properties 180 not explicitly included in annotation instance. If set to true, 181 they will be alphabetically ordered; if false, order is 182 undefined (default setting)</div> 183<dl> 184<dt>Default:</dt> 185<dd>false</dd> 186</dl> 187</li> 188</ul> 189</li> 190</ul> 191</li> 192</ul> 193</div> 194</div> 195<!-- ========= END OF CLASS DATA ========= --> 196<!-- ======= START OF BOTTOM NAVBAR ====== --> 197<div class="bottomNav"><a name="navbar_bottom"> 198<!-- --> 199</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 200<!-- --> 201</a> 202<ul class="navList" title="Navigation"> 203<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 204<li class="navBarCell1Rev">Class</li> 205<li><a href="class-use/JsonPropertyOrder.html">Use</a></li> 206<li><a href="package-tree.html">Tree</a></li> 207<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 208<li><a href="../../../../index-all.html">Index</a></li> 209<li><a href="../../../../help-doc.html">Help</a></li> 210</ul> 211</div> 212<div class="subNav"> 213<ul class="navList"> 214<li><a href="../../../../com/fasterxml/jackson/annotation/JsonPropertyDescription.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 215<li><a href="../../../../com/fasterxml/jackson/annotation/JsonRawValue.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li> 216</ul> 217<ul class="navList"> 218<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonPropertyOrder.html" target="_top">Frames</a></li> 219<li><a href="JsonPropertyOrder.html" target="_top">No Frames</a></li> 220</ul> 221<ul class="navList" id="allclasses_navbar_bottom"> 222<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 223</ul> 224<div> 225<script type="text/javascript"><!-- 226 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 227 if(window==top) { 228 allClassesLink.style.display = "block"; 229 } 230 else { 231 allClassesLink.style.display = "none"; 232 } 233 //--> 234</script> 235</div> 236<div> 237<ul class="subNavList"> 238<li>Summary: </li> 239<li>Required | </li> 240<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 241</ul> 242<ul class="subNavList"> 243<li>Detail: </li> 244<li><a href="#annotation_type_element_detail">Element</a></li> 245</ul> 246</div> 247<a name="skip-navbar_bottom"> 248<!-- --> 249</a></div> 250<!-- ======== END OF BOTTOM NAVBAR ======= --> 251<p class="legalCopy"><small>Copyright © 2008–2016 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p> 252</body> 253</html> 254