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 Wed Nov 13 20:23:19 PST 2013 --> 6<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> 7<title>JsonPropertyOrder (Jackson-annotations 2.3.0 API)</title> 8<meta name="date" content="2013-11-13"> 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.3.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://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#TYPE" title="class or interface in java.lang.annotation">TYPE</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">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 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.</div> 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="../../../../com/fasterxml/jackson/annotation/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://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> 136<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/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://download.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="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 201<li class="navBarCell1Rev">Class</li> 202<li><a href="class-use/JsonPropertyOrder.html">Use</a></li> 203<li><a href="package-tree.html">Tree</a></li> 204<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 205<li><a href="../../../../index-all.html">Index</a></li> 206<li><a href="../../../../help-doc.html">Help</a></li> 207</ul> 208</div> 209<div class="subNav"> 210<ul class="navList"> 211<li><a href="../../../../com/fasterxml/jackson/annotation/JsonPropertyDescription.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 212<li><a href="../../../../com/fasterxml/jackson/annotation/JsonRawValue.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li> 213</ul> 214<ul class="navList"> 215<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonPropertyOrder.html" target="_top">Frames</a></li> 216<li><a href="JsonPropertyOrder.html" target="_top">No Frames</a></li> 217</ul> 218<ul class="navList" id="allclasses_navbar_bottom"> 219<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 220</ul> 221<div> 222<script type="text/javascript"><!-- 223 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 224 if(window==top) { 225 allClassesLink.style.display = "block"; 226 } 227 else { 228 allClassesLink.style.display = "none"; 229 } 230 //--> 231</script> 232</div> 233<div> 234<ul class="subNavList"> 235<li>Summary: </li> 236<li>Required | </li> 237<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 238</ul> 239<ul class="subNavList"> 240<li>Detail: </li> 241<li><a href="#annotation_type_element_detail">Element</a></li> 242</ul> 243</div> 244<a name="skip-navbar_bottom"> 245<!-- --> 246</a></div> 247<!-- ======== END OF BOTTOM NAVBAR ======= --> 248<p class="legalCopy"><small>Copyright © 2012-2013 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p> 249</body> 250</html> 251