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 Jan 01 17:43:55 PST 2015 --> 6<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> 7<title>JsonSerialize (jackson-databind 2.5.0 API)</title> 8<meta name="date" content="2015-01-01"> 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="JsonSerialize (jackson-databind 2.5.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="../../../../../overview-summary.html">Overview</a></li> 29<li><a href="package-summary.html">Package</a></li> 30<li class="navBarCell1Rev">Class</li> 31<li><a href="class-use/JsonSerialize.html">Use</a></li> 32<li><a href="package-tree.html">Tree</a></li> 33<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> 34<li><a href="../../../../../index-all.html">Index</a></li> 35<li><a href="../../../../../help-doc.html">Help</a></li> 36</ul> 37</div> 38<div class="subNav"> 39<ul class="navList"> 40<li><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.Value.html" title="class in com.fasterxml.jackson.databind.annotation"><span class="strong">Prev Class</span></a></li> 41<li><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.Inclusion.html" title="enum in com.fasterxml.jackson.databind.annotation"><span class="strong">Next Class</span></a></li> 42</ul> 43<ul class="navList"> 44<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/annotation/JsonSerialize.html" target="_top">Frames</a></li> 45<li><a href="JsonSerialize.html" target="_top">No Frames</a></li> 46</ul> 47<ul class="navList" id="allclasses_navbar_top"> 48<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> 49</ul> 50<div> 51<script type="text/javascript"><!-- 52 allClassesLink = document.getElementById("allclasses_navbar_top"); 53 if(window==top) { 54 allClassesLink.style.display = "block"; 55 } 56 else { 57 allClassesLink.style.display = "none"; 58 } 59 //--> 60</script> 61</div> 62<div> 63<ul class="subNavList"> 64<li>Summary: </li> 65<li>Required | </li> 66<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 67</ul> 68<ul class="subNavList"> 69<li>Detail: </li> 70<li><a href="#annotation_type_element_detail">Element</a></li> 71</ul> 72</div> 73<a name="skip-navbar_top"> 74<!-- --> 75</a></div> 76<!-- ========= END OF TOP NAVBAR ========= --> 77<!-- ======== START OF CLASS DATA ======== --> 78<div class="header"> 79<div class="subTitle">com.fasterxml.jackson.databind.annotation</div> 80<h2 title="Annotation Type JsonSerialize" class="title">Annotation Type JsonSerialize</h2> 81</div> 82<div class="contentContainer"> 83<div class="description"> 84<ul class="blockList"> 85<li class="blockList"> 86<hr> 87<br> 88<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#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#FIELD" title="class or interface in java.lang.annotation">FIELD</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#PARAMETER" title="class or interface in java.lang.annotation">PARAMETER</a>}) 89<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>) 90public @interface <span class="strong">JsonSerialize</span></pre> 91<div class="block">Annotation used for configuring serialization aspects, by attaching 92 to "getter" methods or fields, or to value classes. 93 When annotating value classes, configuration is used for instances 94 of the value class but can be overridden by more specific annotations 95 (ones that attach to methods or fields). 96<p> 97 An example annotation would be: 98<pre> 99 @JsonSerialize(using=MySerializer.class, 100 as=MySubClass.class, 101 typing=JsonSerialize.Typing.STATIC 102 ) 103</pre> 104 (which would be redundant, since some properties block others: 105 specifically, 'using' has precedence over 'as', which has precedence 106 over 'typing' setting)</div> 107</li> 108</ul> 109</div> 110<div class="summary"> 111<ul class="blockList"> 112<li class="blockList"> 113<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 114<ul class="blockList"> 115<li class="blockList"><a name="annotation_type_optional_element_summary"> 116<!-- --> 117</a> 118<h3>Optional Element Summary</h3> 119<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> 120<caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> 121<tr> 122<th class="colFirst" scope="col">Modifier and Type</th> 123<th class="colLast" scope="col">Optional Element and Description</th> 124</tr> 125<tr class="altColor"> 126<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?></code></td> 127<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#as()">as</a></strong></code> 128<div class="block">Supertype (of declared type, which itself is supertype of runtime type) 129 to use as type when locating serializer to use.</div> 130</td> 131</tr> 132<tr class="rowColor"> 133<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?></code></td> 134<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#contentAs()">contentAs</a></strong></code> 135<div class="block">Concrete type to serialize content value (elements 136 of a Collection/array, values of Maps) as, 137 instead of type otherwise declared.</div> 138</td> 139</tr> 140<tr class="altColor"> 141<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../com/fasterxml/jackson/databind/util/Converter.html" title="interface in com.fasterxml.jackson.databind.util">Converter</a><?,?>></code></td> 142<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#contentConverter()">contentConverter</a></strong></code> 143<div class="block">Similar to <a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#converter()"><code>converter()</code></a>, but used for values of structures types 144 (List, arrays, Maps).</div> 145</td> 146</tr> 147<tr class="rowColor"> 148<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../com/fasterxml/jackson/databind/JsonSerializer.html" title="class in com.fasterxml.jackson.databind">JsonSerializer</a><?>></code></td> 149<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#contentUsing()">contentUsing</a></strong></code> 150<div class="block">Serializer class to use for serializing contents (elements 151 of a Collection/array, values of Maps) of annotated property.</div> 152</td> 153</tr> 154<tr class="altColor"> 155<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../com/fasterxml/jackson/databind/util/Converter.html" title="interface in com.fasterxml.jackson.databind.util">Converter</a><?,?>></code></td> 156<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#converter()">converter</a></strong></code> 157<div class="block">Which helper object is to be used to convert type into something 158 that Jackson knows how to serialize; either because base type 159 can not be serialized easily, or just to alter serialization.</div> 160</td> 161</tr> 162<tr class="rowColor"> 163<td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.Inclusion.html" title="enum in com.fasterxml.jackson.databind.annotation">JsonSerialize.Inclusion</a></code></td> 164<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#include()">include</a></strong></code> 165<div class="block"><strong>Deprecated.</strong> 166<div class="block"><i>As of Jackson 2.0, this annotation has been replaced 167 by <code>JsonInclude</code></i></div> 168</div> 169</td> 170</tr> 171<tr class="altColor"> 172<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?></code></td> 173<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#keyAs()">keyAs</a></strong></code> 174<div class="block">Concrete type to serialize keys 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> as, 175 instead of type otherwise declared.</div> 176</td> 177</tr> 178<tr class="rowColor"> 179<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../com/fasterxml/jackson/databind/JsonSerializer.html" title="class in com.fasterxml.jackson.databind">JsonSerializer</a><?>></code></td> 180<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#keyUsing()">keyUsing</a></strong></code> 181<div class="block">Serializer class to use for serializing Map keys 182 of annotated property.</div> 183</td> 184</tr> 185<tr class="altColor"> 186<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../com/fasterxml/jackson/databind/JsonSerializer.html" title="class in com.fasterxml.jackson.databind">JsonSerializer</a><?>></code></td> 187<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#nullsUsing()">nullsUsing</a></strong></code> 188<div class="block">Serializer class to use for serializing nulls for properties that 189 are annotated, instead of the 190 default null serializer.</div> 191</td> 192</tr> 193<tr class="rowColor"> 194<td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.Typing.html" title="enum in com.fasterxml.jackson.databind.annotation">JsonSerialize.Typing</a></code></td> 195<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#typing()">typing</a></strong></code> 196<div class="block">Whether type detection used is dynamic or static: that is, 197 whether actual runtime type is used (dynamic), or just the 198 declared type (static).</div> 199</td> 200</tr> 201<tr class="altColor"> 202<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../com/fasterxml/jackson/databind/JsonSerializer.html" title="class in com.fasterxml.jackson.databind">JsonSerializer</a><?>></code></td> 203<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#using()">using</a></strong></code> 204<div class="block">Serializer class to use for 205 serializing associated value.</div> 206</td> 207</tr> 208</table> 209</li> 210</ul> 211</li> 212</ul> 213</div> 214<div class="details"> 215<ul class="blockList"> 216<li class="blockList"> 217<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 218<ul class="blockList"> 219<li class="blockList"><a name="annotation_type_element_detail"> 220<!-- --> 221</a> 222<h3>Element Detail</h3> 223<a name="using()"> 224<!-- --> 225</a> 226<ul class="blockList"> 227<li class="blockList"> 228<h4>using</h4> 229<pre>public abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../com/fasterxml/jackson/databind/JsonSerializer.html" title="class in com.fasterxml.jackson.databind">JsonSerializer</a><?>> using</pre> 230<div class="block">Serializer class to use for 231 serializing associated value. Depending on what is annotated, 232 value is either an instance of annotated class (used globablly 233 anywhere where class serializer is needed); or only used for 234 serializing property access via a getter method.</div> 235<dl> 236<dt>Default:</dt> 237<dd>com.fasterxml.jackson.databind.JsonSerializer.None.class</dd> 238</dl> 239</li> 240</ul> 241<a name="contentUsing()"> 242<!-- --> 243</a> 244<ul class="blockList"> 245<li class="blockList"> 246<h4>contentUsing</h4> 247<pre>public abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../com/fasterxml/jackson/databind/JsonSerializer.html" title="class in com.fasterxml.jackson.databind">JsonSerializer</a><?>> contentUsing</pre> 248<div class="block">Serializer class to use for serializing contents (elements 249 of a Collection/array, values of Maps) of annotated property. 250 Can only be used on properties (methods, fields, constructors), 251 and not value classes themselves (as they are typically generic)</div> 252<dl> 253<dt>Default:</dt> 254<dd>com.fasterxml.jackson.databind.JsonSerializer.None.class</dd> 255</dl> 256</li> 257</ul> 258<a name="keyUsing()"> 259<!-- --> 260</a> 261<ul class="blockList"> 262<li class="blockList"> 263<h4>keyUsing</h4> 264<pre>public abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../com/fasterxml/jackson/databind/JsonSerializer.html" title="class in com.fasterxml.jackson.databind">JsonSerializer</a><?>> keyUsing</pre> 265<div class="block">Serializer class to use for serializing Map keys 266 of annotated property. 267 Can only be used on properties (methods, fields, constructors), 268 and not value classes themselves.</div> 269<dl> 270<dt>Default:</dt> 271<dd>com.fasterxml.jackson.databind.JsonSerializer.None.class</dd> 272</dl> 273</li> 274</ul> 275<a name="nullsUsing()"> 276<!-- --> 277</a> 278<ul class="blockList"> 279<li class="blockList"> 280<h4>nullsUsing</h4> 281<pre>public abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../com/fasterxml/jackson/databind/JsonSerializer.html" title="class in com.fasterxml.jackson.databind">JsonSerializer</a><?>> nullsUsing</pre> 282<div class="block">Serializer class to use for serializing nulls for properties that 283 are annotated, instead of the 284 default null serializer. 285 Note that using this property when annotation types (classes) has 286 no effect currently (it is possible this could be improved in future).</div> 287<dl><dt><span class="strong">Since:</span></dt> 288 <dd>2.3</dd></dl> 289<dl> 290<dt>Default:</dt> 291<dd>com.fasterxml.jackson.databind.JsonSerializer.None.class</dd> 292</dl> 293</li> 294</ul> 295<a name="as()"> 296<!-- --> 297</a> 298<ul class="blockList"> 299<li class="blockList"> 300<h4>as</h4> 301<pre>public abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> as</pre> 302<div class="block">Supertype (of declared type, which itself is supertype of runtime type) 303 to use as type when locating serializer to use. 304<p> 305 Bogus type <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Void.html?is-external=true" title="class or interface in java.lang"><code>Void</code></a> can be used to indicate that declared 306 type is used as is (i.e. this annotation property has no setting); 307 this since annotation properties are not allowed to have null value. 308<p> 309 Note: if <a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#using()"><code>using()</code></a> is also used it has precedence 310 (since it directly specifies 311 serializer, whereas this would only be used to locate the 312 serializer) 313 and value of this annotation property is ignored.</div> 314<dl> 315<dt>Default:</dt> 316<dd>java.lang.Void.class</dd> 317</dl> 318</li> 319</ul> 320<a name="keyAs()"> 321<!-- --> 322</a> 323<ul class="blockList"> 324<li class="blockList"> 325<h4>keyAs</h4> 326<pre>public abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> keyAs</pre> 327<div class="block">Concrete type to serialize keys 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> as, 328 instead of type otherwise declared. 329 Must be a supertype of declared type; otherwise an exception may be 330 thrown by serializer.</div> 331<dl> 332<dt>Default:</dt> 333<dd>java.lang.Void.class</dd> 334</dl> 335</li> 336</ul> 337<a name="contentAs()"> 338<!-- --> 339</a> 340<ul class="blockList"> 341<li class="blockList"> 342<h4>contentAs</h4> 343<pre>public abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> contentAs</pre> 344<div class="block">Concrete type to serialize content value (elements 345 of a Collection/array, values of Maps) as, 346 instead of type otherwise declared. 347 Must be a supertype of declared type; otherwise an exception may be 348 thrown by serializer.</div> 349<dl> 350<dt>Default:</dt> 351<dd>java.lang.Void.class</dd> 352</dl> 353</li> 354</ul> 355<a name="typing()"> 356<!-- --> 357</a> 358<ul class="blockList"> 359<li class="blockList"> 360<h4>typing</h4> 361<pre>public abstract <a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.Typing.html" title="enum in com.fasterxml.jackson.databind.annotation">JsonSerialize.Typing</a> typing</pre> 362<div class="block">Whether type detection used is dynamic or static: that is, 363 whether actual runtime type is used (dynamic), or just the 364 declared type (static). 365<p> 366 Note that Jackson 2.3 changed default to <code>DEFAULT_TYPING</code>, 367 which is roughly same as saying "whatever". 368 This is important as it allows avoiding accidental overrides 369 at property level.</div> 370<dl> 371<dt>Default:</dt> 372<dd>com.fasterxml.jackson.databind.annotation.JsonSerialize.Typing.DEFAULT_TYPING</dd> 373</dl> 374</li> 375</ul> 376<a name="converter()"> 377<!-- --> 378</a> 379<ul class="blockList"> 380<li class="blockList"> 381<h4>converter</h4> 382<pre>public abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../com/fasterxml/jackson/databind/util/Converter.html" title="interface in com.fasterxml.jackson.databind.util">Converter</a><?,?>> converter</pre> 383<div class="block">Which helper object is to be used to convert type into something 384 that Jackson knows how to serialize; either because base type 385 can not be serialized easily, or just to alter serialization.</div> 386<dl><dt><span class="strong">Since:</span></dt> 387 <dd>2.2</dd></dl> 388<dl> 389<dt>Default:</dt> 390<dd>com.fasterxml.jackson.databind.util.Converter.None.class</dd> 391</dl> 392</li> 393</ul> 394<a name="contentConverter()"> 395<!-- --> 396</a> 397<ul class="blockList"> 398<li class="blockList"> 399<h4>contentConverter</h4> 400<pre>public abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../com/fasterxml/jackson/databind/util/Converter.html" title="interface in com.fasterxml.jackson.databind.util">Converter</a><?,?>> contentConverter</pre> 401<div class="block">Similar to <a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.html#converter()"><code>converter()</code></a>, but used for values of structures types 402 (List, arrays, Maps). 403 Note that this property does NOT have effect when used as Class annotation; 404 it can only be used as property annotation: this because association between 405 container and value types is loose and as such converters seldom make sense 406 for such usage.</div> 407<dl><dt><span class="strong">Since:</span></dt> 408 <dd>2.2</dd></dl> 409<dl> 410<dt>Default:</dt> 411<dd>com.fasterxml.jackson.databind.util.Converter.None.class</dd> 412</dl> 413</li> 414</ul> 415<a name="include()"> 416<!-- --> 417</a> 418<ul class="blockListLast"> 419<li class="blockList"> 420<h4>include</h4> 421<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> 422public abstract <a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.Inclusion.html" title="enum in com.fasterxml.jackson.databind.annotation">JsonSerialize.Inclusion</a> include</pre> 423<div class="block"><span class="strong">Deprecated.</span> <i>As of Jackson 2.0, this annotation has been replaced 424 by <code>JsonInclude</code></i></div> 425<div class="block">Which properties of annotated Bean are 426 to be included in serialization (has no effect on other types 427 like enums, primitives or collections). 428 Choices are "all", "properties that have value other than null" 429 and "properties that have non-default value" (i.e. default value 430 being property setting for a Bean constructed with default no-arg 431 constructor, often null). 432<p> 433 Note that Jackson 2.3 changed default to <code>DEFAULT_INCLUSION</code>, 434 which is roughly same as saying "whatever". This is important because 435 it allows hierarchic default values to be used.</div> 436<dl> 437<dt>Default:</dt> 438<dd>com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.DEFAULT_INCLUSION</dd> 439</dl> 440</li> 441</ul> 442</li> 443</ul> 444</li> 445</ul> 446</div> 447</div> 448<!-- ========= END OF CLASS DATA ========= --> 449<!-- ======= START OF BOTTOM NAVBAR ====== --> 450<div class="bottomNav"><a name="navbar_bottom"> 451<!-- --> 452</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 453<!-- --> 454</a> 455<ul class="navList" title="Navigation"> 456<li><a href="../../../../../overview-summary.html">Overview</a></li> 457<li><a href="package-summary.html">Package</a></li> 458<li class="navBarCell1Rev">Class</li> 459<li><a href="class-use/JsonSerialize.html">Use</a></li> 460<li><a href="package-tree.html">Tree</a></li> 461<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> 462<li><a href="../../../../../index-all.html">Index</a></li> 463<li><a href="../../../../../help-doc.html">Help</a></li> 464</ul> 465</div> 466<div class="subNav"> 467<ul class="navList"> 468<li><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.Value.html" title="class in com.fasterxml.jackson.databind.annotation"><span class="strong">Prev Class</span></a></li> 469<li><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonSerialize.Inclusion.html" title="enum in com.fasterxml.jackson.databind.annotation"><span class="strong">Next Class</span></a></li> 470</ul> 471<ul class="navList"> 472<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/annotation/JsonSerialize.html" target="_top">Frames</a></li> 473<li><a href="JsonSerialize.html" target="_top">No Frames</a></li> 474</ul> 475<ul class="navList" id="allclasses_navbar_bottom"> 476<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> 477</ul> 478<div> 479<script type="text/javascript"><!-- 480 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 481 if(window==top) { 482 allClassesLink.style.display = "block"; 483 } 484 else { 485 allClassesLink.style.display = "none"; 486 } 487 //--> 488</script> 489</div> 490<div> 491<ul class="subNavList"> 492<li>Summary: </li> 493<li>Required | </li> 494<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 495</ul> 496<ul class="subNavList"> 497<li>Detail: </li> 498<li><a href="#annotation_type_element_detail">Element</a></li> 499</ul> 500</div> 501<a name="skip-navbar_bottom"> 502<!-- --> 503</a></div> 504<!-- ======== END OF BOTTOM NAVBAR ======= --> 505<p class="legalCopy"><small>Copyright © 2014-2015 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p> 506</body> 507</html> 508