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_10-ea) on Sun Jul 14 20:03:21 PDT 2013 --> 6<title>JsonPropertyOrder (Jackson JSON Processor)</title> 7<meta name="date" content="2013-07-14"> 8<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> 9</head> 10<body> 11<script type="text/javascript"><!-- 12 if (location.href.indexOf('is-external=true') == -1) { 13 parent.document.title="JsonPropertyOrder (Jackson JSON Processor)"; 14 } 15//--> 16</script> 17<noscript> 18<div>JavaScript is disabled on your browser.</div> 19</noscript> 20<!-- ========= START OF TOP NAVBAR ======= --> 21<div class="topNav"><a name="navbar_top"> 22<!-- --> 23</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> 24<!-- --> 25</a> 26<ul class="navList" title="Navigation"> 27<li><a href="../../../../overview-summary.html">Overview</a></li> 28<li><a href="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="../../../../org/codehaus/jackson/annotate/JsonProperty.html" title="annotation in org.codehaus.jackson.annotate"><span class="strong">Prev Class</span></a></li> 40<li><a href="../../../../org/codehaus/jackson/annotate/JsonRawValue.html" title="annotation in org.codehaus.jackson.annotate"><span class="strong">Next Class</span></a></li> 41</ul> 42<ul class="navList"> 43<li><a href="../../../../index.html?org/codehaus/jackson/annotate/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">org.codehaus.jackson.annotate</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#TYPE" title="class or interface in java.lang.annotation">TYPE</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 <div>@</div>JsonPropertyOrder({ "id", "name" }) 102 // order any properties that don't have explicit setting using alphabetic order 103 <div>@</div>JsonPropertyOrder(alphabetic=true) 104</pre> 105<p> 106 This annotation has no effect on deserialization.</div> 107<dl><dt><span class="strong">Since:</span></dt> 108 <dd>1.4</dd></dl> 109</li> 110</ul> 111</div> 112<div class="summary"> 113<ul class="blockList"> 114<li class="blockList"> 115<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 116<ul class="blockList"> 117<li class="blockList"><a name="annotation_type_optional_element_summary"> 118<!-- --> 119</a> 120<h3>Optional Element Summary</h3> 121<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> 122<caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> 123<tr> 124<th class="colFirst" scope="col">Modifier and Type</th> 125<th class="colLast" scope="col">Optional Element and Description</th> 126</tr> 127<tr class="altColor"> 128<td class="colFirst"><code>boolean</code></td> 129<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/annotate/JsonPropertyOrder.html#alphabetic()">alphabetic</a></strong></code> 130<div class="block">Property that defines what to do regarding ordering of properties 131 not explicitly included in annotation instance.</div> 132</td> 133</tr> 134<tr class="rowColor"> 135<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> 136<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/annotate/JsonPropertyOrder.html#value()">value</a></strong></code> 137<div class="block">Order in which properties of annotated object are to be serialized in.</div> 138</td> 139</tr> 140</table> 141</li> 142</ul> 143</li> 144</ul> 145</div> 146<div class="details"> 147<ul class="blockList"> 148<li class="blockList"> 149<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 150<ul class="blockList"> 151<li class="blockList"><a name="annotation_type_element_detail"> 152<!-- --> 153</a> 154<h3>Element Detail</h3> 155<a name="value()"> 156<!-- --> 157</a> 158<ul class="blockList"> 159<li class="blockList"> 160<h4>value</h4> 161<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> 162<div class="block">Order in which properties of annotated object are to be serialized in.</div> 163<dl> 164<dt>Default:</dt> 165<dd>{}</dd> 166</dl> 167</li> 168</ul> 169<a name="alphabetic()"> 170<!-- --> 171</a> 172<ul class="blockListLast"> 173<li class="blockList"> 174<h4>alphabetic</h4> 175<pre>public abstract boolean alphabetic</pre> 176<div class="block">Property that defines what to do regarding ordering of properties 177 not explicitly included in annotation instance. If set to true, 178 they will be alphabetically ordered; if false, order is 179 undefined (default setting)</div> 180<dl> 181<dt>Default:</dt> 182<dd>false</dd> 183</dl> 184</li> 185</ul> 186</li> 187</ul> 188</li> 189</ul> 190</div> 191</div> 192<!-- ========= END OF CLASS DATA ========= --> 193<!-- ======= START OF BOTTOM NAVBAR ====== --> 194<div class="bottomNav"><a name="navbar_bottom"> 195<!-- --> 196</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 197<!-- --> 198</a> 199<ul class="navList" title="Navigation"> 200<li><a href="../../../../overview-summary.html">Overview</a></li> 201<li><a href="package-summary.html">Package</a></li> 202<li class="navBarCell1Rev">Class</li> 203<li><a href="class-use/JsonPropertyOrder.html">Use</a></li> 204<li><a href="package-tree.html">Tree</a></li> 205<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 206<li><a href="../../../../index-all.html">Index</a></li> 207<li><a href="../../../../help-doc.html">Help</a></li> 208</ul> 209</div> 210<div class="subNav"> 211<ul class="navList"> 212<li><a href="../../../../org/codehaus/jackson/annotate/JsonProperty.html" title="annotation in org.codehaus.jackson.annotate"><span class="strong">Prev Class</span></a></li> 213<li><a href="../../../../org/codehaus/jackson/annotate/JsonRawValue.html" title="annotation in org.codehaus.jackson.annotate"><span class="strong">Next Class</span></a></li> 214</ul> 215<ul class="navList"> 216<li><a href="../../../../index.html?org/codehaus/jackson/annotate/JsonPropertyOrder.html" target="_top">Frames</a></li> 217<li><a href="JsonPropertyOrder.html" target="_top">No Frames</a></li> 218</ul> 219<ul class="navList" id="allclasses_navbar_bottom"> 220<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 221</ul> 222<div> 223<script type="text/javascript"><!-- 224 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 225 if(window==top) { 226 allClassesLink.style.display = "block"; 227 } 228 else { 229 allClassesLink.style.display = "none"; 230 } 231 //--> 232</script> 233</div> 234<div> 235<ul class="subNavList"> 236<li>Summary: </li> 237<li>Required | </li> 238<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 239</ul> 240<ul class="subNavList"> 241<li>Detail: </li> 242<li><a href="#annotation_type_element_detail">Element</a></li> 243</ul> 244</div> 245<a name="skip-navbar_bottom"> 246<!-- --> 247</a></div> 248<!-- ======== END OF BOTTOM NAVBAR ======= --> 249</body> 250</html> 251