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