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 Wed Jul 20 08:39:10 PDT 2016 --> 6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<title>SerializationFeature (jackson-databind 2.8.0 API)</title> 8<meta name="date" content="2016-07-20"> 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="SerializationFeature (jackson-databind 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="../../../../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/SerializationFeature.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/SerializationConfig.html" title="class in com.fasterxml.jackson.databind"><span class="strong">Prev Class</span></a></li> 41<li><a href="../../../../com/fasterxml/jackson/databind/SerializerProvider.html" title="class in com.fasterxml.jackson.databind"><span class="strong">Next Class</span></a></li> 42</ul> 43<ul class="navList"> 44<li><a href="../../../../index.html?com/fasterxml/jackson/databind/SerializationFeature.html" target="_top">Frames</a></li> 45<li><a href="SerializationFeature.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>Nested | </li> 66<li><a href="#enum_constant_summary">Enum Constants</a> | </li> 67<li>Field | </li> 68<li><a href="#method_summary">Method</a></li> 69</ul> 70<ul class="subNavList"> 71<li>Detail: </li> 72<li><a href="#enum_constant_detail">Enum Constants</a> | </li> 73<li>Field | </li> 74<li><a href="#method_detail">Method</a></li> 75</ul> 76</div> 77<a name="skip-navbar_top"> 78<!-- --> 79</a></div> 80<!-- ========= END OF TOP NAVBAR ========= --> 81<!-- ======== START OF CLASS DATA ======== --> 82<div class="header"> 83<div class="subTitle">com.fasterxml.jackson.databind</div> 84<h2 title="Enum SerializationFeature" class="title">Enum SerializationFeature</h2> 85</div> 86<div class="contentContainer"> 87<ul class="inheritance"> 88<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> 89<li> 90<ul class="inheritance"> 91<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">java.lang.Enum</a><<a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a>></li> 92<li> 93<ul class="inheritance"> 94<li>com.fasterxml.jackson.databind.SerializationFeature</li> 95</ul> 96</li> 97</ul> 98</li> 99</ul> 100<div class="description"> 101<ul class="blockList"> 102<li class="blockList"> 103<dl> 104<dt>All Implemented Interfaces:</dt> 105<dd><a href="../../../../com/fasterxml/jackson/databind/cfg/ConfigFeature.html" title="interface in com.fasterxml.jackson.databind.cfg">ConfigFeature</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a><<a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a>></dd> 106</dl> 107<hr> 108<br> 109<pre>public enum <span class="strong">SerializationFeature</span> 110extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a><<a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a>> 111implements <a href="../../../../com/fasterxml/jackson/databind/cfg/ConfigFeature.html" title="interface in com.fasterxml.jackson.databind.cfg">ConfigFeature</a></pre> 112<div class="block">Enumeration that defines simple on/off features that affect 113 the way Java objects are serialized. 114<p> 115 Note that features can be set both through 116 <a href="../../../../com/fasterxml/jackson/databind/ObjectMapper.html" title="class in com.fasterxml.jackson.databind"><code>ObjectMapper</code></a> (as sort of defaults) and through 117 <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html" title="class in com.fasterxml.jackson.databind"><code>ObjectWriter</code></a>. 118 In first case these defaults must follow "config-then-use" patterns 119 (i.e. defined once, not changed afterwards); all per-call 120 changes must be done using <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html" title="class in com.fasterxml.jackson.databind"><code>ObjectWriter</code></a>.</div> 121</li> 122</ul> 123</div> 124<div class="summary"> 125<ul class="blockList"> 126<li class="blockList"> 127<!-- =========== ENUM CONSTANT SUMMARY =========== --> 128<ul class="blockList"> 129<li class="blockList"><a name="enum_constant_summary"> 130<!-- --> 131</a> 132<h3>Enum Constant Summary</h3> 133<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Constant Summary table, listing enum constants, and an explanation"> 134<caption><span>Enum Constants</span><span class="tabEnd"> </span></caption> 135<tr> 136<th class="colOne" scope="col">Enum Constant and Description</th> 137</tr> 138<tr class="altColor"> 139<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#CLOSE_CLOSEABLE">CLOSE_CLOSEABLE</a></strong></code> 140<div class="block">Feature that determines whether <code>close</code> method of 141 serialized <b>root level</b> objects (ones for which <code>ObjectMapper</code>'s 142 writeValue() (or equivalent) method is called) 143 that implement <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a> 144 is called after serialization or not.</div> 145</td> 146</tr> 147<tr class="rowColor"> 148<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#EAGER_SERIALIZER_FETCH">EAGER_SERIALIZER_FETCH</a></strong></code> 149<div class="block">Feature that determines whether <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html" title="class in com.fasterxml.jackson.databind"><code>ObjectWriter</code></a> should 150 try to eagerly fetch necessary <a href="../../../../com/fasterxml/jackson/databind/JsonSerializer.html" title="class in com.fasterxml.jackson.databind"><code>JsonSerializer</code></a> when 151 possible.</div> 152</td> 153</tr> 154<tr class="altColor"> 155<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#FAIL_ON_EMPTY_BEANS">FAIL_ON_EMPTY_BEANS</a></strong></code> 156<div class="block">Feature that determines what happens when no accessors are 157 found for a type (and there are no annotations to indicate 158 it is meant to be serialized).</div> 159</td> 160</tr> 161<tr class="rowColor"> 162<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#FAIL_ON_SELF_REFERENCES">FAIL_ON_SELF_REFERENCES</a></strong></code> 163<div class="block">Feature that determines what happens when a direct self-reference 164 is detected by a POJO (and no Object Id handling is enabled for it): 165 either a <a href="../../../../com/fasterxml/jackson/databind/JsonMappingException.html" title="class in com.fasterxml.jackson.databind"><code>JsonMappingException</code></a> is 166 thrown (if true), or reference is normally processed (false).</div> 167</td> 168</tr> 169<tr class="altColor"> 170<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS">FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS</a></strong></code> 171<div class="block">Feature that determines what happens when an object which 172 normally has type information included by Jackson is used 173 in conjunction with <a href="http://fasterxml.github.com/jackson-annotations/javadoc/2.7/com/fasterxml/jackson/annotation/JsonUnwrapped.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonUnwrapped</code></a>.</div> 174</td> 175</tr> 176<tr class="rowColor"> 177<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#FLUSH_AFTER_WRITE_VALUE">FLUSH_AFTER_WRITE_VALUE</a></strong></code> 178<div class="block">Feature that determines whether <code>JsonGenerator.flush()</code> is 179 called after <code>writeValue()</code> method <b>that takes JsonGenerator 180 as an argument</b> completes (i.e.</div> 181</td> 182</tr> 183<tr class="altColor"> 184<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#INDENT_OUTPUT">INDENT_OUTPUT</a></strong></code> 185<div class="block">Feature that allows enabling (or disabling) indentation 186 for the underlying generator, using the default pretty 187 printer configured for <a href="../../../../com/fasterxml/jackson/databind/ObjectMapper.html" title="class in com.fasterxml.jackson.databind"><code>ObjectMapper</code></a> (and 188 <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html" title="class in com.fasterxml.jackson.databind"><code>ObjectWriter</code></a>s created from mapper).</div> 189</td> 190</tr> 191<tr class="rowColor"> 192<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#ORDER_MAP_ENTRIES_BY_KEYS">ORDER_MAP_ENTRIES_BY_KEYS</a></strong></code> 193<div class="block">Feature that determines whether <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> entries are first 194 sorted by key before serialization or not: if enabled, additional sorting 195 step is performed if necessary (not necessary for <a href="http://docs.oracle.com/javase/7/docs/api/java/util/SortedMap.html?is-external=true" title="class or interface in java.util"><code>SortedMap</code></a>s), 196 if disabled, no additional sorting is needed.</div> 197</td> 198</tr> 199<tr class="altColor"> 200<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#USE_EQUALITY_FOR_OBJECT_ID">USE_EQUALITY_FOR_OBJECT_ID</a></strong></code> 201<div class="block">Feature that determines whether Object Identity is compared using 202 true JVM-level identity of Object (false); or, <code>equals()</code> method.</div> 203</td> 204</tr> 205<tr class="rowColor"> 206<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRAP_EXCEPTIONS">WRAP_EXCEPTIONS</a></strong></code> 207<div class="block">Feature that determines whether Jackson code should catch 208 and wrap <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang"><code>Exception</code></a>s (but never <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Error.html?is-external=true" title="class or interface in java.lang"><code>Error</code></a>s!) 209 to add additional information about 210 location (within input) of problem or not.</div> 211</td> 212</tr> 213<tr class="altColor"> 214<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRAP_ROOT_VALUE">WRAP_ROOT_VALUE</a></strong></code> 215<div class="block">Feature that can be enabled to make root value (usually JSON 216 Object but can be any type) wrapped within a single property 217 JSON object, where key as the "root name", as determined by 218 annotation introspector (esp.</div> 219</td> 220</tr> 221<tr class="rowColor"> 222<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_BIGDECIMAL_AS_PLAIN">WRITE_BIGDECIMAL_AS_PLAIN</a></strong></code> 223<div class="block"><strong>Deprecated.</strong> 224<div class="block"><i>Since 2.5: use <a href="http://fasterxml.github.com/jackson-core/javadoc/2.7/com/fasterxml/jackson/core/JsonGenerator.Feature.html?is-external=true#WRITE_BIGDECIMAL_AS_PLAIN" title="class or interface in com.fasterxml.jackson.core"><code>JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN</code></a> instead 225 (using <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html#with(com.fasterxml.jackson.core.JsonGenerator.Feature)"><code>ObjectWriter.with(com.fasterxml.jackson.core.JsonGenerator.Feature)</code></a>).</i></div> 226</div> 227</td> 228</tr> 229<tr class="altColor"> 230<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_CHAR_ARRAYS_AS_JSON_ARRAYS">WRITE_CHAR_ARRAYS_AS_JSON_ARRAYS</a></strong></code> 231<div class="block">Feature that determines how type <code>char[]</code> is serialized: 232 when enabled, will be serialized as an explict JSON array (with 233 single-character Strings as values); when disabled, defaults to 234 serializing them as Strings (which is more compact).</div> 235</td> 236</tr> 237<tr class="rowColor"> 238<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_DATE_KEYS_AS_TIMESTAMPS">WRITE_DATE_KEYS_AS_TIMESTAMPS</a></strong></code> 239<div class="block">Feature that determines whether <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util"><code>Date</code></a>s 240 (and sub-types) used as <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> keys are serialized 241 as timestamps or not (if not, will be serialized as textual 242 values).</div> 243</td> 244</tr> 245<tr class="altColor"> 246<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS">WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS</a></strong></code> 247<div class="block">Feature that controls whether numeric timestamp values are 248 to be written using nanosecond timestamps (enabled) or not (disabled); 249 <b>if and only if</b> datatype supports such resolution.</div> 250</td> 251</tr> 252<tr class="rowColor"> 253<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_DATES_AS_TIMESTAMPS">WRITE_DATES_AS_TIMESTAMPS</a></strong></code> 254<div class="block">Feature that determines whether Date (and date/time) values 255 (and Date-based things like <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util"><code>Calendar</code></a>s) are to be 256 serialized as numeric timestamps (true; the default), 257 or as something else (usually textual representation).</div> 258</td> 259</tr> 260<tr class="altColor"> 261<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_DATES_WITH_ZONE_ID">WRITE_DATES_WITH_ZONE_ID</a></strong></code> 262<div class="block">Feature that determines whether date/date-time values should be serialized 263 so that they include timezone id, in cases where type itself contains 264 timezone information.</div> 265</td> 266</tr> 267<tr class="rowColor"> 268<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_DURATIONS_AS_TIMESTAMPS">WRITE_DURATIONS_AS_TIMESTAMPS</a></strong></code> 269<div class="block">Feature that determines whether time values that represents time periods 270 (durations, periods, ranges) are to be serialized by default using 271 a numeric (true) or textual (false) representations.</div> 272</td> 273</tr> 274<tr class="altColor"> 275<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_EMPTY_JSON_ARRAYS">WRITE_EMPTY_JSON_ARRAYS</a></strong></code> 276<div class="block"><strong>Deprecated.</strong> 277<div class="block"><i>Since 2.8 there are better mechanism for specifying filtering; specifically 278 using <a href="http://fasterxml.github.com/jackson-annotations/javadoc/2.7/com/fasterxml/jackson/annotation/JsonFormat.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonFormat</code></a> or configuration overrides.</i></div> 279</div> 280</td> 281</tr> 282<tr class="rowColor"> 283<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_ENUMS_USING_INDEX">WRITE_ENUMS_USING_INDEX</a></strong></code> 284<div class="block">Feature that determines whethere Java Enum values are serialized 285 as numbers (true), or textual values (false).</div> 286</td> 287</tr> 288<tr class="altColor"> 289<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_ENUMS_USING_TO_STRING">WRITE_ENUMS_USING_TO_STRING</a></strong></code> 290<div class="block">Feature that determines standard serialization mechanism used for 291 Enum values: if enabled, return value of <code>Enum.toString()</code> 292 is used; if disabled, return value of <code>Enum.name()</code> is used.</div> 293</td> 294</tr> 295<tr class="rowColor"> 296<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_NULL_MAP_VALUES">WRITE_NULL_MAP_VALUES</a></strong></code> 297<div class="block">Feature that determines whether Map entries with null values are 298 to be serialized (true) or not (false).</div> 299</td> 300</tr> 301<tr class="altColor"> 302<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED">WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED</a></strong></code> 303<div class="block">Feature added for interoperability, to work with oddities of 304 so-called "BadgerFish" convention.</div> 305</td> 306</tr> 307</table> 308</li> 309</ul> 310<!-- ========== METHOD SUMMARY =========== --> 311<ul class="blockList"> 312<li class="blockList"><a name="method_summary"> 313<!-- --> 314</a> 315<h3>Method Summary</h3> 316<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 317<caption><span>Methods</span><span class="tabEnd"> </span></caption> 318<tr> 319<th class="colFirst" scope="col">Modifier and Type</th> 320<th class="colLast" scope="col">Method and Description</th> 321</tr> 322<tr class="altColor"> 323<td class="colFirst"><code>boolean</code></td> 324<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#enabledByDefault()">enabledByDefault</a></strong>()</code> 325<div class="block">Accessor for checking whether this feature is enabled by default.</div> 326</td> 327</tr> 328<tr class="rowColor"> 329<td class="colFirst"><code>boolean</code></td> 330<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#enabledIn(int)">enabledIn</a></strong>(int flags)</code> 331<div class="block">Convenience method for checking whether feature is enabled in given bitmask</div> 332</td> 333</tr> 334<tr class="altColor"> 335<td class="colFirst"><code>int</code></td> 336<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#getMask()">getMask</a></strong>()</code> 337<div class="block">Returns bit mask for this feature instance</div> 338</td> 339</tr> 340<tr class="rowColor"> 341<td class="colFirst"><code>static <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a></code></td> 342<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#valueOf(java.lang.String)">valueOf</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> 343<div class="block">Returns the enum constant of this type with the specified name.</div> 344</td> 345</tr> 346<tr class="altColor"> 347<td class="colFirst"><code>static <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a>[]</code></td> 348<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#values()">values</a></strong>()</code> 349<div class="block">Returns an array containing the constants of this enum type, in 350the order they are declared.</div> 351</td> 352</tr> 353</table> 354<ul class="blockList"> 355<li class="blockList"><a name="methods_inherited_from_class_java.lang.Enum"> 356<!-- --> 357</a> 358<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a></h3> 359<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#compareTo(E)" title="class or interface in java.lang">compareTo</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#getDeclaringClass()" title="class or interface in java.lang">getDeclaringClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#name()" title="class or interface in java.lang">name</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#ordinal()" title="class or interface in java.lang">ordinal</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html?is-external=true#valueOf(java.lang.Class,%20java.lang.String)" title="class or interface in java.lang">valueOf</a></code></li> 360</ul> 361<ul class="blockList"> 362<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> 363<!-- --> 364</a> 365<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> 366<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li> 367</ul> 368</li> 369</ul> 370</li> 371</ul> 372</div> 373<div class="details"> 374<ul class="blockList"> 375<li class="blockList"> 376<!-- ============ ENUM CONSTANT DETAIL =========== --> 377<ul class="blockList"> 378<li class="blockList"><a name="enum_constant_detail"> 379<!-- --> 380</a> 381<h3>Enum Constant Detail</h3> 382<a name="WRAP_ROOT_VALUE"> 383<!-- --> 384</a> 385<ul class="blockList"> 386<li class="blockList"> 387<h4>WRAP_ROOT_VALUE</h4> 388<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRAP_ROOT_VALUE</pre> 389<div class="block">Feature that can be enabled to make root value (usually JSON 390 Object but can be any type) wrapped within a single property 391 JSON object, where key as the "root name", as determined by 392 annotation introspector (esp. for JAXB that uses 393 <code>@XmlRootElement.name</code>) or fallback (non-qualified 394 class name). 395 Feature is mostly intended for JAXB compatibility. 396<p> 397 Feature is disabled by default.</div> 398</li> 399</ul> 400<a name="INDENT_OUTPUT"> 401<!-- --> 402</a> 403<ul class="blockList"> 404<li class="blockList"> 405<h4>INDENT_OUTPUT</h4> 406<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> INDENT_OUTPUT</pre> 407<div class="block">Feature that allows enabling (or disabling) indentation 408 for the underlying generator, using the default pretty 409 printer configured for <a href="../../../../com/fasterxml/jackson/databind/ObjectMapper.html" title="class in com.fasterxml.jackson.databind"><code>ObjectMapper</code></a> (and 410 <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html" title="class in com.fasterxml.jackson.databind"><code>ObjectWriter</code></a>s created from mapper). 411<p> 412 Note that the default pretty printer is only used if 413 no explicit <a href="http://fasterxml.github.com/jackson-core/javadoc/2.7/com/fasterxml/jackson/core/PrettyPrinter.html?is-external=true" title="class or interface in com.fasterxml.jackson.core"><code>PrettyPrinter</code></a> has been configured 414 for the generator or <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html" title="class in com.fasterxml.jackson.databind"><code>ObjectWriter</code></a>. 415<p> 416 Feature is disabled by default.</div> 417</li> 418</ul> 419<a name="FAIL_ON_EMPTY_BEANS"> 420<!-- --> 421</a> 422<ul class="blockList"> 423<li class="blockList"> 424<h4>FAIL_ON_EMPTY_BEANS</h4> 425<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> FAIL_ON_EMPTY_BEANS</pre> 426<div class="block">Feature that determines what happens when no accessors are 427 found for a type (and there are no annotations to indicate 428 it is meant to be serialized). If enabled (default), an 429 exception is thrown to indicate these as non-serializable 430 types; if disabled, they are serialized as empty Objects, 431 i.e. without any properties. 432<p> 433 Note that empty types that this feature has only effect on 434 those "empty" beans that do not have any recognized annotations 435 (like <code>@JsonSerialize</code>): ones that do have annotations 436 do not result in an exception being thrown. 437<p> 438 Feature is enabled by default.</div> 439</li> 440</ul> 441<a name="FAIL_ON_SELF_REFERENCES"> 442<!-- --> 443</a> 444<ul class="blockList"> 445<li class="blockList"> 446<h4>FAIL_ON_SELF_REFERENCES</h4> 447<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> FAIL_ON_SELF_REFERENCES</pre> 448<div class="block">Feature that determines what happens when a direct self-reference 449 is detected by a POJO (and no Object Id handling is enabled for it): 450 either a <a href="../../../../com/fasterxml/jackson/databind/JsonMappingException.html" title="class in com.fasterxml.jackson.databind"><code>JsonMappingException</code></a> is 451 thrown (if true), or reference is normally processed (false). 452<p> 453 Feature is enabled by default.</div> 454<dl><dt><span class="strong">Since:</span></dt> 455 <dd>2.4</dd></dl> 456</li> 457</ul> 458<a name="WRAP_EXCEPTIONS"> 459<!-- --> 460</a> 461<ul class="blockList"> 462<li class="blockList"> 463<h4>WRAP_EXCEPTIONS</h4> 464<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRAP_EXCEPTIONS</pre> 465<div class="block">Feature that determines whether Jackson code should catch 466 and wrap <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang"><code>Exception</code></a>s (but never <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Error.html?is-external=true" title="class or interface in java.lang"><code>Error</code></a>s!) 467 to add additional information about 468 location (within input) of problem or not. If enabled, 469 most exceptions will be caught and re-thrown (exception 470 specifically being that <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><code>IOException</code></a>s may be passed 471 as is, since they are declared as throwable); this can be 472 convenient both in that all exceptions will be checked and 473 declared, and so there is more contextual information. 474 However, sometimes calling application may just want "raw" 475 unchecked exceptions passed as is. 476<p> 477<p> 478 Feature is enabled by default.</div> 479</li> 480</ul> 481<a name="FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS"> 482<!-- --> 483</a> 484<ul class="blockList"> 485<li class="blockList"> 486<h4>FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS</h4> 487<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS</pre> 488<div class="block">Feature that determines what happens when an object which 489 normally has type information included by Jackson is used 490 in conjunction with <a href="http://fasterxml.github.com/jackson-annotations/javadoc/2.7/com/fasterxml/jackson/annotation/JsonUnwrapped.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonUnwrapped</code></a>. 491 In the default (enabled) state, an error will be thrown when 492 an unwrapped object has type information. When disabled, the 493 object will be unwrapped and the type information discarded. 494<p> 495 Feature is enabled by default.</div> 496<dl><dt><span class="strong">Since:</span></dt> 497 <dd>2.4</dd></dl> 498</li> 499</ul> 500<a name="CLOSE_CLOSEABLE"> 501<!-- --> 502</a> 503<ul class="blockList"> 504<li class="blockList"> 505<h4>CLOSE_CLOSEABLE</h4> 506<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> CLOSE_CLOSEABLE</pre> 507<div class="block">Feature that determines whether <code>close</code> method of 508 serialized <b>root level</b> objects (ones for which <code>ObjectMapper</code>'s 509 writeValue() (or equivalent) method is called) 510 that implement <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a> 511 is called after serialization or not. If enabled, <b>close()</b> will 512 be called after serialization completes (whether succesfully, or 513 due to an error manifested by an exception being thrown). You can 514 think of this as sort of "finally" processing. 515<p> 516 NOTE: only affects behavior with <b>root</b> objects, and not other 517 objects reachable from the root object. Put another way, only one 518 call will be made for each 'writeValue' call. 519<p> 520 Feature is disabled by default.</div> 521</li> 522</ul> 523<a name="FLUSH_AFTER_WRITE_VALUE"> 524<!-- --> 525</a> 526<ul class="blockList"> 527<li class="blockList"> 528<h4>FLUSH_AFTER_WRITE_VALUE</h4> 529<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> FLUSH_AFTER_WRITE_VALUE</pre> 530<div class="block">Feature that determines whether <code>JsonGenerator.flush()</code> is 531 called after <code>writeValue()</code> method <b>that takes JsonGenerator 532 as an argument</b> completes (i.e. does NOT affect methods 533 that use other destinations); same for methods in <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html" title="class in com.fasterxml.jackson.databind"><code>ObjectWriter</code></a>. 534 This usually makes sense; but there are cases where flushing 535 should not be forced: for example when underlying stream is 536 compressing and flush() causes compression state to be flushed 537 (which occurs with some compression codecs). 538<p> 539 Feature is enabled by default.</div> 540</li> 541</ul> 542<a name="WRITE_DATES_AS_TIMESTAMPS"> 543<!-- --> 544</a> 545<ul class="blockList"> 546<li class="blockList"> 547<h4>WRITE_DATES_AS_TIMESTAMPS</h4> 548<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_DATES_AS_TIMESTAMPS</pre> 549<div class="block">Feature that determines whether Date (and date/time) values 550 (and Date-based things like <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util"><code>Calendar</code></a>s) are to be 551 serialized as numeric timestamps (true; the default), 552 or as something else (usually textual representation). 553 If textual representation is used, the actual format is 554 one returned by a call to 555 <a href="../../../../com/fasterxml/jackson/databind/cfg/MapperConfig.html#getDateFormat()"><code>MapperConfig.getDateFormat()</code></a>: 556 the default setting being <a href="../../../../com/fasterxml/jackson/databind/util/StdDateFormat.html" title="class in com.fasterxml.jackson.databind.util"><code>StdDateFormat</code></a>, 557 which corresponds to format String of "yyyy-MM-dd'T'HH:mm:ss.SSSZ" 558 (see <a href="http://docs.oracle.com/javase/7/docs/api/java/text/DateFormat.html?is-external=true" title="class or interface in java.text"><code>DateFormat</code></a> for details of format Strings). 559<p> 560 Note: whether this feature affects handling of other date-related 561 types depend on handlers of those types, although ideally they 562 should use this feature 563<p> 564 Note: whether <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> keys are serialized as Strings 565 or not is controlled using <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_DATE_KEYS_AS_TIMESTAMPS"><code>WRITE_DATE_KEYS_AS_TIMESTAMPS</code></a>. 566<p> 567 Feature is enabled by default, so that date/time are by default 568 serialized as timestamps.</div> 569</li> 570</ul> 571<a name="WRITE_DATE_KEYS_AS_TIMESTAMPS"> 572<!-- --> 573</a> 574<ul class="blockList"> 575<li class="blockList"> 576<h4>WRITE_DATE_KEYS_AS_TIMESTAMPS</h4> 577<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_DATE_KEYS_AS_TIMESTAMPS</pre> 578<div class="block">Feature that determines whether <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util"><code>Date</code></a>s 579 (and sub-types) used as <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> keys are serialized 580 as timestamps or not (if not, will be serialized as textual 581 values). 582<p> 583 Default value is 'false', meaning that Date-valued Map keys are serialized 584 as textual (ISO-8601) values. 585<p> 586 Feature is disabled by default.</div> 587</li> 588</ul> 589<a name="WRITE_DATES_WITH_ZONE_ID"> 590<!-- --> 591</a> 592<ul class="blockList"> 593<li class="blockList"> 594<h4>WRITE_DATES_WITH_ZONE_ID</h4> 595<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_DATES_WITH_ZONE_ID</pre> 596<div class="block">Feature that determines whether date/date-time values should be serialized 597 so that they include timezone id, in cases where type itself contains 598 timezone information. Including this information may lead to compatibility 599 issues because ISO-8601 specification does not define formats that include 600 such information. 601<p> 602 If enabled, Timezone id should be included using format specified 603 with Java 8 <code>DateTimeFormatter#ISO_ZONED_DATE_TIME</code> definition 604 (for example, '2011-12-03T10:15:30+01:00[Europe/Paris]'). 605<p> 606 Note: setting has no relevance if date/time values are serialized as timestamps. 607<p> 608 Feature is disabled by default, so that zone id is NOT included; rather, timezone 609 offset is used for ISO-8601 compatibility (if any timezone information is 610 included in value).</div> 611<dl><dt><span class="strong">Since:</span></dt> 612 <dd>2.6</dd></dl> 613</li> 614</ul> 615<a name="WRITE_DURATIONS_AS_TIMESTAMPS"> 616<!-- --> 617</a> 618<ul class="blockList"> 619<li class="blockList"> 620<h4>WRITE_DURATIONS_AS_TIMESTAMPS</h4> 621<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_DURATIONS_AS_TIMESTAMPS</pre> 622<div class="block">Feature that determines whether time values that represents time periods 623 (durations, periods, ranges) are to be serialized by default using 624 a numeric (true) or textual (false) representations. Note that numeric 625 representation may mean either simple number, or an array of numbers, 626 depending on type. 627<p> 628 Note: whether <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> keys are serialized as Strings 629 or not is controlled using <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_DATE_KEYS_AS_TIMESTAMPS"><code>WRITE_DATE_KEYS_AS_TIMESTAMPS</code></a>. 630<p> 631 Feature is enabled by default, so that period/duration are by default 632 serialized as timestamps.</div> 633<dl><dt><span class="strong">Since:</span></dt> 634 <dd>2.5</dd></dl> 635</li> 636</ul> 637<a name="WRITE_CHAR_ARRAYS_AS_JSON_ARRAYS"> 638<!-- --> 639</a> 640<ul class="blockList"> 641<li class="blockList"> 642<h4>WRITE_CHAR_ARRAYS_AS_JSON_ARRAYS</h4> 643<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_CHAR_ARRAYS_AS_JSON_ARRAYS</pre> 644<div class="block">Feature that determines how type <code>char[]</code> is serialized: 645 when enabled, will be serialized as an explict JSON array (with 646 single-character Strings as values); when disabled, defaults to 647 serializing them as Strings (which is more compact). 648<p> 649 Feature is disabled by default.</div> 650</li> 651</ul> 652<a name="WRITE_ENUMS_USING_TO_STRING"> 653<!-- --> 654</a> 655<ul class="blockList"> 656<li class="blockList"> 657<h4>WRITE_ENUMS_USING_TO_STRING</h4> 658<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_ENUMS_USING_TO_STRING</pre> 659<div class="block">Feature that determines standard serialization mechanism used for 660 Enum values: if enabled, return value of <code>Enum.toString()</code> 661 is used; if disabled, return value of <code>Enum.name()</code> is used. 662<p> 663 Note: this feature should usually have same value 664 as <a href="../../../../com/fasterxml/jackson/databind/DeserializationFeature.html#READ_ENUMS_USING_TO_STRING"><code>DeserializationFeature.READ_ENUMS_USING_TO_STRING</code></a>. 665<p> 666 Feature is disabled by default.</div> 667</li> 668</ul> 669<a name="WRITE_ENUMS_USING_INDEX"> 670<!-- --> 671</a> 672<ul class="blockList"> 673<li class="blockList"> 674<h4>WRITE_ENUMS_USING_INDEX</h4> 675<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_ENUMS_USING_INDEX</pre> 676<div class="block">Feature that determines whethere Java Enum values are serialized 677 as numbers (true), or textual values (false). If textual values are 678 used, other settings are also considered. 679 If this feature is enabled, 680 return value of <code>Enum.ordinal()</code> 681 (an integer) will be used as the serialization. 682<p> 683 Note that this feature has precedence over <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_ENUMS_USING_TO_STRING"><code>WRITE_ENUMS_USING_TO_STRING</code></a>, 684 which is only considered if this feature is set to false. 685<p> 686 Feature is disabled by default.</div> 687</li> 688</ul> 689<a name="WRITE_NULL_MAP_VALUES"> 690<!-- --> 691</a> 692<ul class="blockList"> 693<li class="blockList"> 694<h4>WRITE_NULL_MAP_VALUES</h4> 695<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_NULL_MAP_VALUES</pre> 696<div class="block">Feature that determines whether Map entries with null values are 697 to be serialized (true) or not (false). 698<p> 699 Feature is enabled by default.</div> 700</li> 701</ul> 702<a name="WRITE_EMPTY_JSON_ARRAYS"> 703<!-- --> 704</a> 705<ul class="blockList"> 706<li class="blockList"> 707<h4>WRITE_EMPTY_JSON_ARRAYS</h4> 708<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> 709public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_EMPTY_JSON_ARRAYS</pre> 710<div class="block"><span class="strong">Deprecated.</span> <i>Since 2.8 there are better mechanism for specifying filtering; specifically 711 using <a href="http://fasterxml.github.com/jackson-annotations/javadoc/2.7/com/fasterxml/jackson/annotation/JsonFormat.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonFormat</code></a> or configuration overrides.</i></div> 712<div class="block">Feature that determines whether Container properties (POJO properties 713 with declared value of Collection or array; i.e. things that produce JSON 714 arrays) that are empty (have no elements) 715 will be serialized as empty JSON arrays (true), or suppressed from output (false). 716<p> 717 Note that this does not change behavior of <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a>s, or 718 "Collection-like" types. 719<p> 720 NOTE: unlike other <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind"><code>SerializationFeature</code></a>s, this feature <b>can not</b> be 721 dynamically changed on per-call basis, because its effect is considered during 722 construction of serializers and property handlers. 723<p> 724 Feature is enabled by default.</div> 725</li> 726</ul> 727<a name="WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED"> 728<!-- --> 729</a> 730<ul class="blockList"> 731<li class="blockList"> 732<h4>WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED</h4> 733<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED</pre> 734<div class="block">Feature added for interoperability, to work with oddities of 735 so-called "BadgerFish" convention. 736 Feature determines handling of single element <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a>s 737 and arrays: if enabled, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a>s and arrays that contain exactly 738 one element will be serialized as if that element itself was serialized. 739<p> 740 When enabled, a POJO with array that normally looks like this: 741<pre> 742 { "arrayProperty" : [ 1 ] } 743</pre> 744 will instead be serialized as 745<pre> 746 { "arrayProperty" : 1 } 747</pre> 748<p> 749 Note that this feature is counterpart to <a href="../../../../com/fasterxml/jackson/databind/DeserializationFeature.html#ACCEPT_SINGLE_VALUE_AS_ARRAY"><code>DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY</code></a> 750 (that is, usually both are enabled, or neither is). 751<p> 752 Feature is disabled by default, so that no special handling is done.</div> 753</li> 754</ul> 755<a name="WRITE_BIGDECIMAL_AS_PLAIN"> 756<!-- --> 757</a> 758<ul class="blockList"> 759<li class="blockList"> 760<h4>WRITE_BIGDECIMAL_AS_PLAIN</h4> 761<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> 762public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_BIGDECIMAL_AS_PLAIN</pre> 763<div class="block"><span class="strong">Deprecated.</span> <i>Since 2.5: use <a href="http://fasterxml.github.com/jackson-core/javadoc/2.7/com/fasterxml/jackson/core/JsonGenerator.Feature.html?is-external=true#WRITE_BIGDECIMAL_AS_PLAIN" title="class or interface in com.fasterxml.jackson.core"><code>JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN</code></a> instead 764 (using <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html#with(com.fasterxml.jackson.core.JsonGenerator.Feature)"><code>ObjectWriter.with(com.fasterxml.jackson.core.JsonGenerator.Feature)</code></a>).</i></div> 765<div class="block">Feature that determines whether <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> entries are 766 serialized using <a href="http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html?is-external=true#toPlainString()" title="class or interface in java.math"><code>BigDecimal.toPlainString()</code></a> to prevent 767 values to be written using scientific notation. 768<p> 769 NOTE: since this feature typically requires use of 770 <a href="http://fasterxml.github.com/jackson-core/javadoc/2.7/com/fasterxml/jackson/core/JsonGenerator.html?is-external=true#writeNumber(java.lang.String)" title="class or interface in com.fasterxml.jackson.core"><code>JsonGenerator.writeNumber(String)</code></a> 771 it may cause compatibility problems since not all <a href="http://fasterxml.github.com/jackson-core/javadoc/2.7/com/fasterxml/jackson/core/JsonGenerator.html?is-external=true" title="class or interface in com.fasterxml.jackson.core"><code>JsonGenerator</code></a> 772 implementations support such mode of output: usually only text-based formats 773 support it. 774<p> 775 Feature is disabled by default.</div> 776</li> 777</ul> 778<a name="WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS"> 779<!-- --> 780</a> 781<ul class="blockList"> 782<li class="blockList"> 783<h4>WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS</h4> 784<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS</pre> 785<div class="block">Feature that controls whether numeric timestamp values are 786 to be written using nanosecond timestamps (enabled) or not (disabled); 787 <b>if and only if</b> datatype supports such resolution. 788 Only newer datatypes (such as Java8 Date/Time) support such resolution -- 789 older types (pre-Java8 <b>java.util.Date</b> etc) and Joda do not -- 790 and this setting <b>has no effect</b> on such types. 791<p> 792 If disabled, standard millisecond timestamps are assumed. 793 This is the counterpart to <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS"><code>WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS</code></a>. 794<p> 795 Feature is enabled by default, to support most accurate time values possible.</div> 796<dl><dt><span class="strong">Since:</span></dt> 797 <dd>2.2</dd></dl> 798</li> 799</ul> 800<a name="ORDER_MAP_ENTRIES_BY_KEYS"> 801<!-- --> 802</a> 803<ul class="blockList"> 804<li class="blockList"> 805<h4>ORDER_MAP_ENTRIES_BY_KEYS</h4> 806<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> ORDER_MAP_ENTRIES_BY_KEYS</pre> 807<div class="block">Feature that determines whether <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> entries are first 808 sorted by key before serialization or not: if enabled, additional sorting 809 step is performed if necessary (not necessary for <a href="http://docs.oracle.com/javase/7/docs/api/java/util/SortedMap.html?is-external=true" title="class or interface in java.util"><code>SortedMap</code></a>s), 810 if disabled, no additional sorting is needed. 811<p> 812 Feature is disabled by default.</div> 813</li> 814</ul> 815<a name="EAGER_SERIALIZER_FETCH"> 816<!-- --> 817</a> 818<ul class="blockList"> 819<li class="blockList"> 820<h4>EAGER_SERIALIZER_FETCH</h4> 821<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> EAGER_SERIALIZER_FETCH</pre> 822<div class="block">Feature that determines whether <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html" title="class in com.fasterxml.jackson.databind"><code>ObjectWriter</code></a> should 823 try to eagerly fetch necessary <a href="../../../../com/fasterxml/jackson/databind/JsonSerializer.html" title="class in com.fasterxml.jackson.databind"><code>JsonSerializer</code></a> when 824 possible. This improves performance in cases where similarly 825 configured <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html" title="class in com.fasterxml.jackson.databind"><code>ObjectWriter</code></a> instance is used multiple 826 times; and should not significantly affect single-use cases. 827<p> 828 Note that there should not be any need to normally disable this 829 feature: only consider that if there are actual perceived problems. 830<p> 831 Feature is enabled by default.</div> 832<dl><dt><span class="strong">Since:</span></dt> 833 <dd>2.1</dd></dl> 834</li> 835</ul> 836<a name="USE_EQUALITY_FOR_OBJECT_ID"> 837<!-- --> 838</a> 839<ul class="blockListLast"> 840<li class="blockList"> 841<h4>USE_EQUALITY_FOR_OBJECT_ID</h4> 842<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> USE_EQUALITY_FOR_OBJECT_ID</pre> 843<div class="block">Feature that determines whether Object Identity is compared using 844 true JVM-level identity of Object (false); or, <code>equals()</code> method. 845 Latter is sometimes useful when dealing with Database-bound objects with 846 ORM libraries (like Hibernate). Note that Object itself is actually compared, 847 and NOT Object Id; naming of this feature is somewhat confusing, so it is important 848 that Object <b>for which identity is to be preserved</b> are considered equal, 849 above and beyond ids (which are always compared using equality anyway). 850<p> 851 NOTE: due to the way functionality is implemented, it is very important that 852 in addition to overriding <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang"><code>Object.equals(java.lang.Object)</code></a> for Objects to match (to be considered 853 "same") it is also necessary to ensure that <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang"><code>Object.hashCode()</code></a> is overridden 854 to produce the exact same value for equal instances. 855<p> 856 Feature is disabled by default; meaning that strict identity is used, not 857 <code>equals()</code></div> 858<dl><dt><span class="strong">Since:</span></dt> 859 <dd>2.3</dd></dl> 860</li> 861</ul> 862</li> 863</ul> 864<!-- ============ METHOD DETAIL ========== --> 865<ul class="blockList"> 866<li class="blockList"><a name="method_detail"> 867<!-- --> 868</a> 869<h3>Method Detail</h3> 870<a name="values()"> 871<!-- --> 872</a> 873<ul class="blockList"> 874<li class="blockList"> 875<h4>values</h4> 876<pre>public static <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a>[] values()</pre> 877<div class="block">Returns an array containing the constants of this enum type, in 878the order they are declared. This method may be used to iterate 879over the constants as follows: 880<pre> 881for (SerializationFeature c : SerializationFeature.values()) 882 System.out.println(c); 883</pre></div> 884<dl><dt><span class="strong">Returns:</span></dt><dd>an array containing the constants of this enum type, in the order they are declared</dd></dl> 885</li> 886</ul> 887<a name="valueOf(java.lang.String)"> 888<!-- --> 889</a> 890<ul class="blockList"> 891<li class="blockList"> 892<h4>valueOf</h4> 893<pre>public static <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> valueOf(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> 894<div class="block">Returns the enum constant of this type with the specified name. 895The string must match <i>exactly</i> an identifier used to declare an 896enum constant in this type. (Extraneous whitespace characters are 897not permitted.)</div> 898<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - the name of the enum constant to be returned.</dd> 899<dt><span class="strong">Returns:</span></dt><dd>the enum constant with the specified name</dd> 900<dt><span class="strong">Throws:</span></dt> 901<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if this enum type has no constant with the specified name</dd> 902<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the argument is null</dd></dl> 903</li> 904</ul> 905<a name="enabledByDefault()"> 906<!-- --> 907</a> 908<ul class="blockList"> 909<li class="blockList"> 910<h4>enabledByDefault</h4> 911<pre>public boolean enabledByDefault()</pre> 912<div class="block"><strong>Description copied from interface: <code><a href="../../../../com/fasterxml/jackson/databind/cfg/ConfigFeature.html#enabledByDefault()">ConfigFeature</a></code></strong></div> 913<div class="block">Accessor for checking whether this feature is enabled by default.</div> 914<dl> 915<dt><strong>Specified by:</strong></dt> 916<dd><code><a href="../../../../com/fasterxml/jackson/databind/cfg/ConfigFeature.html#enabledByDefault()">enabledByDefault</a></code> in interface <code><a href="../../../../com/fasterxml/jackson/databind/cfg/ConfigFeature.html" title="interface in com.fasterxml.jackson.databind.cfg">ConfigFeature</a></code></dd> 917</dl> 918</li> 919</ul> 920<a name="getMask()"> 921<!-- --> 922</a> 923<ul class="blockList"> 924<li class="blockList"> 925<h4>getMask</h4> 926<pre>public int getMask()</pre> 927<div class="block"><strong>Description copied from interface: <code><a href="../../../../com/fasterxml/jackson/databind/cfg/ConfigFeature.html#getMask()">ConfigFeature</a></code></strong></div> 928<div class="block">Returns bit mask for this feature instance</div> 929<dl> 930<dt><strong>Specified by:</strong></dt> 931<dd><code><a href="../../../../com/fasterxml/jackson/databind/cfg/ConfigFeature.html#getMask()">getMask</a></code> in interface <code><a href="../../../../com/fasterxml/jackson/databind/cfg/ConfigFeature.html" title="interface in com.fasterxml.jackson.databind.cfg">ConfigFeature</a></code></dd> 932</dl> 933</li> 934</ul> 935<a name="enabledIn(int)"> 936<!-- --> 937</a> 938<ul class="blockListLast"> 939<li class="blockList"> 940<h4>enabledIn</h4> 941<pre>public boolean enabledIn(int flags)</pre> 942<div class="block"><strong>Description copied from interface: <code><a href="../../../../com/fasterxml/jackson/databind/cfg/ConfigFeature.html#enabledIn(int)">ConfigFeature</a></code></strong></div> 943<div class="block">Convenience method for checking whether feature is enabled in given bitmask</div> 944<dl> 945<dt><strong>Specified by:</strong></dt> 946<dd><code><a href="../../../../com/fasterxml/jackson/databind/cfg/ConfigFeature.html#enabledIn(int)">enabledIn</a></code> in interface <code><a href="../../../../com/fasterxml/jackson/databind/cfg/ConfigFeature.html" title="interface in com.fasterxml.jackson.databind.cfg">ConfigFeature</a></code></dd> 947</dl> 948</li> 949</ul> 950</li> 951</ul> 952</li> 953</ul> 954</div> 955</div> 956<!-- ========= END OF CLASS DATA ========= --> 957<!-- ======= START OF BOTTOM NAVBAR ====== --> 958<div class="bottomNav"><a name="navbar_bottom"> 959<!-- --> 960</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 961<!-- --> 962</a> 963<ul class="navList" title="Navigation"> 964<li><a href="../../../../overview-summary.html">Overview</a></li> 965<li><a href="package-summary.html">Package</a></li> 966<li class="navBarCell1Rev">Class</li> 967<li><a href="class-use/SerializationFeature.html">Use</a></li> 968<li><a href="package-tree.html">Tree</a></li> 969<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 970<li><a href="../../../../index-all.html">Index</a></li> 971<li><a href="../../../../help-doc.html">Help</a></li> 972</ul> 973</div> 974<div class="subNav"> 975<ul class="navList"> 976<li><a href="../../../../com/fasterxml/jackson/databind/SerializationConfig.html" title="class in com.fasterxml.jackson.databind"><span class="strong">Prev Class</span></a></li> 977<li><a href="../../../../com/fasterxml/jackson/databind/SerializerProvider.html" title="class in com.fasterxml.jackson.databind"><span class="strong">Next Class</span></a></li> 978</ul> 979<ul class="navList"> 980<li><a href="../../../../index.html?com/fasterxml/jackson/databind/SerializationFeature.html" target="_top">Frames</a></li> 981<li><a href="SerializationFeature.html" target="_top">No Frames</a></li> 982</ul> 983<ul class="navList" id="allclasses_navbar_bottom"> 984<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 985</ul> 986<div> 987<script type="text/javascript"><!-- 988 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 989 if(window==top) { 990 allClassesLink.style.display = "block"; 991 } 992 else { 993 allClassesLink.style.display = "none"; 994 } 995 //--> 996</script> 997</div> 998<div> 999<ul class="subNavList"> 1000<li>Summary: </li> 1001<li>Nested | </li> 1002<li><a href="#enum_constant_summary">Enum Constants</a> | </li> 1003<li>Field | </li> 1004<li><a href="#method_summary">Method</a></li> 1005</ul> 1006<ul class="subNavList"> 1007<li>Detail: </li> 1008<li><a href="#enum_constant_detail">Enum Constants</a> | </li> 1009<li>Field | </li> 1010<li><a href="#method_detail">Method</a></li> 1011</ul> 1012</div> 1013<a name="skip-navbar_bottom"> 1014<!-- --> 1015</a></div> 1016<!-- ======== END OF BOTTOM NAVBAR ======= --> 1017<p class="legalCopy"><small>Copyright © 2008–2016 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p> 1018</body> 1019</html> 1020