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_162) on Tue Nov 05 19:39:07 PST 2019 --> 6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<title>SerializationFeature (jackson-databind 2.10.0 API)</title> 8<meta name="date" content="2019-11-05"> 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.10.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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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 <a href="http://fasterxml.github.io/jackson-annotations/javadoc/2.10/com/fasterxml/jackson/annotation/JsonUnwrapped.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonUnwrapped</code></a>.</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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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 <a href="http://fasterxml.github.io/jackson-core/javadoc/2.10/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 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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/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"><span class="deprecatedLabel">Deprecated.</span> 290<div class="block"><span class="deprecationComment">Since 2.8 there are better mechanism for specifying filtering; specifically 291 using <a href="http://fasterxml.github.io/jackson-annotations/javadoc/2.10/com/fasterxml/jackson/annotation/JsonInclude.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonInclude</code></a> or configuration overrides.</span></div> 292</div> 293</td> 294</tr> 295<tr class="rowColor"> 296<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_ENUM_KEYS_USING_INDEX">WRITE_ENUM_KEYS_USING_INDEX</a></span></code> 297<div class="block">Feature that determines whether {link Enum}s 298 used as <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> keys are serialized 299 as using <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#ordinal--" title="class or interface in java.lang"><code>Enum.ordinal()</code></a> or not.</div> 300</td> 301</tr> 302<tr class="altColor"> 303<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> 304<div class="block">Feature that determines whether Java Enum values are serialized 305 as numbers (true), or textual values (false).</div> 306</td> 307</tr> 308<tr class="rowColor"> 309<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> 310<div class="block">Feature that determines standard serialization mechanism used for 311 Enum values: if enabled, return value of <code>Enum.toString()</code> 312 is used; if disabled, return value of <code>Enum.name()</code> is used.</div> 313</td> 314</tr> 315<tr class="altColor"> 316<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> 317<div class="block"><span class="deprecatedLabel">Deprecated.</span> 318<div class="block"><span class="deprecationComment">Since 2.9 there are better mechanism for specifying filtering; specifically 319 using <a href="http://fasterxml.github.io/jackson-annotations/javadoc/2.10/com/fasterxml/jackson/annotation/JsonInclude.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonInclude</code></a> or configuration overrides 320 (see <a href="../../../../com/fasterxml/jackson/databind/ObjectMapper.html#configOverride-java.lang.Class-"><code>ObjectMapper.configOverride(Class)</code></a>}).</span></div> 321</div> 322</td> 323</tr> 324<tr class="rowColor"> 325<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> 326<div class="block">Feature added for interoperability, to work with oddities of 327 so-called "BadgerFish" convention.</div> 328</td> 329</tr> 330</table> 331</li> 332</ul> 333<!-- ========== METHOD SUMMARY =========== --> 334<ul class="blockList"> 335<li class="blockList"><a name="method.summary"> 336<!-- --> 337</a> 338<h3>Method Summary</h3> 339<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 340<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> 341<tr> 342<th class="colFirst" scope="col">Modifier and Type</th> 343<th class="colLast" scope="col">Method and Description</th> 344</tr> 345<tr id="i0" class="altColor"> 346<td class="colFirst"><code>boolean</code></td> 347<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#enabledByDefault--">enabledByDefault</a></span>()</code> 348<div class="block">Accessor for checking whether this feature is enabled by default.</div> 349</td> 350</tr> 351<tr id="i1" class="rowColor"> 352<td class="colFirst"><code>boolean</code></td> 353<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#enabledIn-int-">enabledIn</a></span>(int flags)</code> 354<div class="block">Convenience method for checking whether feature is enabled in given bitmask</div> 355</td> 356</tr> 357<tr id="i2" class="altColor"> 358<td class="colFirst"><code>int</code></td> 359<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#getMask--">getMask</a></span>()</code> 360<div class="block">Returns bit mask for this feature instance</div> 361</td> 362</tr> 363<tr id="i3" class="rowColor"> 364<td class="colFirst"><code>static <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a></code></td> 365<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#valueOf-java.lang.String-">valueOf</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> 366<div class="block">Returns the enum constant of this type with the specified name.</div> 367</td> 368</tr> 369<tr id="i4" class="altColor"> 370<td class="colFirst"><code>static <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a>[]</code></td> 371<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#values--">values</a></span>()</code> 372<div class="block">Returns an array containing the constants of this enum type, in 373the order they are declared.</div> 374</td> 375</tr> 376</table> 377<ul class="blockList"> 378<li class="blockList"><a name="methods.inherited.from.class.java.lang.Enum"> 379<!-- --> 380</a> 381<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</a></h3> 382<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#compareTo-E-" title="class or interface in java.lang">compareTo</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#getDeclaringClass--" title="class or interface in java.lang">getDeclaringClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#name--" title="class or interface in java.lang">name</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#ordinal--" title="class or interface in java.lang">ordinal</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/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> 383</ul> 384<ul class="blockList"> 385<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> 386<!-- --> 387</a> 388<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> 389<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> 390</ul> 391</li> 392</ul> 393</li> 394</ul> 395</div> 396<div class="details"> 397<ul class="blockList"> 398<li class="blockList"> 399<!-- ============ ENUM CONSTANT DETAIL =========== --> 400<ul class="blockList"> 401<li class="blockList"><a name="enum.constant.detail"> 402<!-- --> 403</a> 404<h3>Enum Constant Detail</h3> 405<a name="WRAP_ROOT_VALUE"> 406<!-- --> 407</a> 408<ul class="blockList"> 409<li class="blockList"> 410<h4>WRAP_ROOT_VALUE</h4> 411<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> 412<div class="block">Feature that can be enabled to make root value (usually JSON 413 Object but can be any type) wrapped within a single property 414 JSON object, where key as the "root name", as determined by 415 annotation introspector (esp. for JAXB that uses 416 <code>@XmlRootElement.name</code>) or fallback (non-qualified 417 class name). 418 Feature is mostly intended for JAXB compatibility. 419<p> 420 Feature is disabled by default.</div> 421</li> 422</ul> 423<a name="INDENT_OUTPUT"> 424<!-- --> 425</a> 426<ul class="blockList"> 427<li class="blockList"> 428<h4>INDENT_OUTPUT</h4> 429<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> INDENT_OUTPUT</pre> 430<div class="block">Feature that allows enabling (or disabling) indentation 431 for the underlying generator, using the default pretty 432 printer configured for <a href="../../../../com/fasterxml/jackson/databind/ObjectMapper.html" title="class in com.fasterxml.jackson.databind"><code>ObjectMapper</code></a> (and 433 <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html" title="class in com.fasterxml.jackson.databind"><code>ObjectWriter</code></a>s created from mapper). 434<p> 435 Note that the default pretty printer is only used if 436 no explicit <a href="http://fasterxml.github.io/jackson-core/javadoc/2.10/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 437 for the generator or <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html" title="class in com.fasterxml.jackson.databind"><code>ObjectWriter</code></a>. 438<p> 439 Feature is disabled by default.</div> 440</li> 441</ul> 442<a name="FAIL_ON_EMPTY_BEANS"> 443<!-- --> 444</a> 445<ul class="blockList"> 446<li class="blockList"> 447<h4>FAIL_ON_EMPTY_BEANS</h4> 448<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> 449<div class="block">Feature that determines what happens when no accessors are 450 found for a type (and there are no annotations to indicate 451 it is meant to be serialized). If enabled (default), an 452 exception is thrown to indicate these as non-serializable 453 types; if disabled, they are serialized as empty Objects, 454 i.e. without any properties. 455<p> 456 Note that empty types that this feature has only effect on 457 those "empty" beans that do not have any recognized annotations 458 (like <code>@JsonSerialize</code>): ones that do have annotations 459 do not result in an exception being thrown. 460<p> 461 Feature is enabled by default.</div> 462</li> 463</ul> 464<a name="FAIL_ON_SELF_REFERENCES"> 465<!-- --> 466</a> 467<ul class="blockList"> 468<li class="blockList"> 469<h4>FAIL_ON_SELF_REFERENCES</h4> 470<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> 471<div class="block">Feature that determines what happens when a direct self-reference 472 is detected by a POJO (and no Object Id handling is enabled for it): 473 either a <a href="../../../../com/fasterxml/jackson/databind/JsonMappingException.html" title="class in com.fasterxml.jackson.databind"><code>JsonMappingException</code></a> is 474 thrown (if true), or reference is normally processed (false). 475<p> 476 Feature is enabled by default.</div> 477<dl> 478<dt><span class="simpleTagLabel">Since:</span></dt> 479<dd>2.4</dd> 480</dl> 481</li> 482</ul> 483<a name="WRAP_EXCEPTIONS"> 484<!-- --> 485</a> 486<ul class="blockList"> 487<li class="blockList"> 488<h4>WRAP_EXCEPTIONS</h4> 489<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRAP_EXCEPTIONS</pre> 490<div class="block">Feature that determines whether Jackson code should catch 491 and wrap <a href="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/docs/api/java/lang/Error.html?is-external=true" title="class or interface in java.lang"><code>Error</code></a>s!) 492 to add additional information about 493 location (within input) of problem or not. If enabled, 494 most exceptions will be caught and re-thrown (exception 495 specifically being that <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io"><code>IOException</code></a>s may be passed 496 as is, since they are declared as throwable); this can be 497 convenient both in that all exceptions will be checked and 498 declared, and so there is more contextual information. 499 However, sometimes calling application may just want "raw" 500 unchecked exceptions passed as is. 501<p> 502<p> 503 Feature is enabled by default.</div> 504</li> 505</ul> 506<a name="FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS"> 507<!-- --> 508</a> 509<ul class="blockList"> 510<li class="blockList"> 511<h4>FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS</h4> 512<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> 513<div class="block">Feature that determines what happens when an object which 514 normally has type information included by Jackson is used 515 in conjunction with <a href="http://fasterxml.github.io/jackson-annotations/javadoc/2.10/com/fasterxml/jackson/annotation/JsonUnwrapped.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonUnwrapped</code></a>. 516 In the default (enabled) state, an error will be thrown when 517 an unwrapped object has type information. When disabled, the 518 object will be unwrapped and the type information discarded. 519<p> 520 Feature is enabled by default.</div> 521<dl> 522<dt><span class="simpleTagLabel">Since:</span></dt> 523<dd>2.4</dd> 524</dl> 525</li> 526</ul> 527<a name="CLOSE_CLOSEABLE"> 528<!-- --> 529</a> 530<ul class="blockList"> 531<li class="blockList"> 532<h4>CLOSE_CLOSEABLE</h4> 533<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> CLOSE_CLOSEABLE</pre> 534<div class="block">Feature that determines whether <code>close</code> method of 535 serialized <b>root level</b> objects (ones for which <code>ObjectMapper</code>'s 536 writeValue() (or equivalent) method is called) 537 that implement <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a> 538 is called after serialization or not. If enabled, <b>close()</b> will 539 be called after serialization completes (whether succesfully, or 540 due to an error manifested by an exception being thrown). You can 541 think of this as sort of "finally" processing. 542<p> 543 NOTE: only affects behavior with <b>root</b> objects, and not other 544 objects reachable from the root object. Put another way, only one 545 call will be made for each 'writeValue' call. 546<p> 547 Feature is disabled by default.</div> 548</li> 549</ul> 550<a name="FLUSH_AFTER_WRITE_VALUE"> 551<!-- --> 552</a> 553<ul class="blockList"> 554<li class="blockList"> 555<h4>FLUSH_AFTER_WRITE_VALUE</h4> 556<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> 557<div class="block">Feature that determines whether <code>JsonGenerator.flush()</code> is 558 called after <code>writeValue()</code> method <b>that takes JsonGenerator 559 as an argument</b> completes (i.e. does NOT affect methods 560 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>. 561 This usually makes sense; but there are cases where flushing 562 should not be forced: for example when underlying stream is 563 compressing and flush() causes compression state to be flushed 564 (which occurs with some compression codecs). 565<p> 566 Feature is enabled by default.</div> 567</li> 568</ul> 569<a name="WRITE_DATES_AS_TIMESTAMPS"> 570<!-- --> 571</a> 572<ul class="blockList"> 573<li class="blockList"> 574<h4>WRITE_DATES_AS_TIMESTAMPS</h4> 575<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> 576<div class="block">Feature that determines whether Date (and date/time) values 577 (and Date-based things like <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Calendar.html?is-external=true" title="class or interface in java.util"><code>Calendar</code></a>s) are to be 578 serialized as numeric timestamps (true; the default), 579 or as something else (usually textual representation). 580 If textual representation is used, the actual format is 581 one returned by a call to 582 <a href="../../../../com/fasterxml/jackson/databind/cfg/MapperConfig.html#getDateFormat--"><code>MapperConfig.getDateFormat()</code></a>: 583 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>, 584 which corresponds to format String of "yyyy-MM-dd'T'HH:mm:ss.SSSZ" 585 (see <a href="https://docs.oracle.com/javase/8/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). 586<p> 587 Note: whether this feature affects handling of other date-related 588 types depend on handlers of those types, although ideally they 589 should use this feature 590<p> 591 Note: whether <a href="https://docs.oracle.com/javase/8/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 592 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>. 593<p> 594 Feature is enabled by default, so that date/time are by default 595 serialized as timestamps.</div> 596</li> 597</ul> 598<a name="WRITE_DATE_KEYS_AS_TIMESTAMPS"> 599<!-- --> 600</a> 601<ul class="blockList"> 602<li class="blockList"> 603<h4>WRITE_DATE_KEYS_AS_TIMESTAMPS</h4> 604<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> 605<div class="block">Feature that determines whether <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util"><code>Date</code></a>s 606 (and sub-types) used as <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> keys are serialized 607 as timestamps or not (if not, will be serialized as textual 608 values). 609<p> 610 Default value is 'false', meaning that Date-valued Map keys are serialized 611 as textual (ISO-8601) values. 612<p> 613 Feature is disabled by default.</div> 614</li> 615</ul> 616<a name="WRITE_DATES_WITH_ZONE_ID"> 617<!-- --> 618</a> 619<ul class="blockList"> 620<li class="blockList"> 621<h4>WRITE_DATES_WITH_ZONE_ID</h4> 622<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> 623<div class="block">Feature that determines whether date/date-time values should be serialized 624 so that they include timezone id, in cases where type itself contains 625 timezone information. Including this information may lead to compatibility 626 issues because ISO-8601 specification does not define formats that include 627 such information. 628<p> 629 If enabled, Timezone id should be included using format specified 630 with Java 8 <code>DateTimeFormatter#ISO_ZONED_DATE_TIME</code> definition 631 (for example, '2011-12-03T10:15:30+01:00[Europe/Paris]'). 632<p> 633 Note: setting has no relevance if date/time values are serialized as timestamps. 634<p> 635 Feature is disabled by default, so that zone id is NOT included; rather, timezone 636 offset is used for ISO-8601 compatibility (if any timezone information is 637 included in value).</div> 638<dl> 639<dt><span class="simpleTagLabel">Since:</span></dt> 640<dd>2.6</dd> 641</dl> 642</li> 643</ul> 644<a name="WRITE_DURATIONS_AS_TIMESTAMPS"> 645<!-- --> 646</a> 647<ul class="blockList"> 648<li class="blockList"> 649<h4>WRITE_DURATIONS_AS_TIMESTAMPS</h4> 650<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> 651<div class="block">Feature that determines whether time values that represents time periods 652 (durations, periods, ranges) are to be serialized by default using 653 a numeric (true) or textual (false) representations. Note that numeric 654 representation may mean either simple number, or an array of numbers, 655 depending on type. 656<p> 657 Note: whether <a href="https://docs.oracle.com/javase/8/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 658 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>. 659<p> 660 Feature is enabled by default, so that period/duration are by default 661 serialized as timestamps.</div> 662<dl> 663<dt><span class="simpleTagLabel">Since:</span></dt> 664<dd>2.5</dd> 665</dl> 666</li> 667</ul> 668<a name="WRITE_CHAR_ARRAYS_AS_JSON_ARRAYS"> 669<!-- --> 670</a> 671<ul class="blockList"> 672<li class="blockList"> 673<h4>WRITE_CHAR_ARRAYS_AS_JSON_ARRAYS</h4> 674<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> 675<div class="block">Feature that determines how type <code>char[]</code> is serialized: 676 when enabled, will be serialized as an explict JSON array (with 677 single-character Strings as values); when disabled, defaults to 678 serializing them as Strings (which is more compact). 679<p> 680 Feature is disabled by default.</div> 681</li> 682</ul> 683<a name="WRITE_ENUMS_USING_TO_STRING"> 684<!-- --> 685</a> 686<ul class="blockList"> 687<li class="blockList"> 688<h4>WRITE_ENUMS_USING_TO_STRING</h4> 689<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> 690<div class="block">Feature that determines standard serialization mechanism used for 691 Enum values: if enabled, return value of <code>Enum.toString()</code> 692 is used; if disabled, return value of <code>Enum.name()</code> is used. 693<p> 694 Note: this feature should usually have same value 695 as <a href="../../../../com/fasterxml/jackson/databind/DeserializationFeature.html#READ_ENUMS_USING_TO_STRING"><code>DeserializationFeature.READ_ENUMS_USING_TO_STRING</code></a>. 696<p> 697 Feature is disabled by default.</div> 698</li> 699</ul> 700<a name="WRITE_ENUMS_USING_INDEX"> 701<!-- --> 702</a> 703<ul class="blockList"> 704<li class="blockList"> 705<h4>WRITE_ENUMS_USING_INDEX</h4> 706<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> 707<div class="block">Feature that determines whether Java Enum values are serialized 708 as numbers (true), or textual values (false). If textual values are 709 used, other settings are also considered. 710 If this feature is enabled, 711 return value of <code>Enum.ordinal()</code> 712 (an integer) will be used as the serialization. 713<p> 714 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>, 715 which is only considered if this feature is set to false. 716<p> 717 Note that since 2.10, this does NOT apply to <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><code>Enum</code></a>s written as 718 keys of <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> values, which has separate setting, 719 <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_ENUM_KEYS_USING_INDEX"><code>WRITE_ENUM_KEYS_USING_INDEX</code></a>. 720<p> 721 Feature is disabled by default.</div> 722</li> 723</ul> 724<a name="WRITE_ENUM_KEYS_USING_INDEX"> 725<!-- --> 726</a> 727<ul class="blockList"> 728<li class="blockList"> 729<h4>WRITE_ENUM_KEYS_USING_INDEX</h4> 730<pre>public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_ENUM_KEYS_USING_INDEX</pre> 731<div class="block">Feature that determines whether {link Enum}s 732 used as <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> keys are serialized 733 as using <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true#ordinal--" title="class or interface in java.lang"><code>Enum.ordinal()</code></a> or not. 734 Similar to <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_ENUMS_USING_INDEX"><code>WRITE_ENUMS_USING_INDEX</code></a> used when writing 735 <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang"><code>Enum</code></a>s as regular values. 736<p> 737 Feature is disabled by default.</div> 738<dl> 739<dt><span class="simpleTagLabel">Since:</span></dt> 740<dd>2.10</dd> 741</dl> 742</li> 743</ul> 744<a name="WRITE_NULL_MAP_VALUES"> 745<!-- --> 746</a> 747<ul class="blockList"> 748<li class="blockList"> 749<h4>WRITE_NULL_MAP_VALUES</h4> 750<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> 751public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_NULL_MAP_VALUES</pre> 752<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Since 2.9 there are better mechanism for specifying filtering; specifically 753 using <a href="http://fasterxml.github.io/jackson-annotations/javadoc/2.10/com/fasterxml/jackson/annotation/JsonInclude.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonInclude</code></a> or configuration overrides 754 (see <a href="../../../../com/fasterxml/jackson/databind/ObjectMapper.html#configOverride-java.lang.Class-"><code>ObjectMapper.configOverride(Class)</code></a>}).</span></div> 755<div class="block">Feature that determines whether Map entries with null values are 756 to be serialized (true) or not (false). 757<p> 758 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>cannot</b> be 759 dynamically changed on per-call basis, because its effect is considered during 760 construction of serializers and property handlers. 761<p> 762 Feature is enabled by default.</div> 763</li> 764</ul> 765<a name="WRITE_EMPTY_JSON_ARRAYS"> 766<!-- --> 767</a> 768<ul class="blockList"> 769<li class="blockList"> 770<h4>WRITE_EMPTY_JSON_ARRAYS</h4> 771<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> 772public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_EMPTY_JSON_ARRAYS</pre> 773<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Since 2.8 there are better mechanism for specifying filtering; specifically 774 using <a href="http://fasterxml.github.io/jackson-annotations/javadoc/2.10/com/fasterxml/jackson/annotation/JsonInclude.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonInclude</code></a> or configuration overrides.</span></div> 775<div class="block">Feature that determines whether Container properties (POJO properties 776 with declared value of Collection or array; i.e. things that produce JSON 777 arrays) that are empty (have no elements) 778 will be serialized as empty JSON arrays (true), or suppressed from output (false). 779<p> 780 Note that this does not change behavior of <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a>s, or 781 "Collection-like" types. 782<p> 783 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>cannot</b> be 784 dynamically changed on per-call basis, because its effect is considered during 785 construction of serializers and property handlers. 786<p> 787 Feature is enabled by default.</div> 788</li> 789</ul> 790<a name="WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED"> 791<!-- --> 792</a> 793<ul class="blockList"> 794<li class="blockList"> 795<h4>WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED</h4> 796<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> 797<div class="block">Feature added for interoperability, to work with oddities of 798 so-called "BadgerFish" convention. 799 Feature determines handling of single element <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><code>Collection</code></a>s 800 and arrays: if enabled, <a href="https://docs.oracle.com/javase/8/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 801 one element will be serialized as if that element itself was serialized. 802<p> 803 When enabled, a POJO with array that normally looks like this: 804<pre> 805 { "arrayProperty" : [ 1 ] } 806</pre> 807 will instead be serialized as 808<pre> 809 { "arrayProperty" : 1 } 810</pre> 811<p> 812 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> 813 (that is, usually both are enabled, or neither is). 814<p> 815 Feature is disabled by default, so that no special handling is done.</div> 816</li> 817</ul> 818<a name="WRITE_BIGDECIMAL_AS_PLAIN"> 819<!-- --> 820</a> 821<ul class="blockList"> 822<li class="blockList"> 823<h4>WRITE_BIGDECIMAL_AS_PLAIN</h4> 824<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a> 825public static final <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> WRITE_BIGDECIMAL_AS_PLAIN</pre> 826<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Since 2.5: use <a href="http://fasterxml.github.io/jackson-core/javadoc/2.10/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 827 (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> 828<div class="block">Feature that determines whether <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math"><code>BigDecimal</code></a> entries are 829 serialized using <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true#toPlainString--" title="class or interface in java.math"><code>BigDecimal.toPlainString()</code></a> to prevent 830 values to be written using scientific notation. 831<p> 832 NOTE: since this feature typically requires use of 833 <a href="http://fasterxml.github.io/jackson-core/javadoc/2.10/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> 834 it may cause compatibility problems since not all <a href="http://fasterxml.github.io/jackson-core/javadoc/2.10/com/fasterxml/jackson/core/JsonGenerator.html?is-external=true" title="class or interface in com.fasterxml.jackson.core"><code>JsonGenerator</code></a> 835 implementations support such mode of output: usually only text-based formats 836 support it. 837<p> 838 Feature is disabled by default.</div> 839</li> 840</ul> 841<a name="WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS"> 842<!-- --> 843</a> 844<ul class="blockList"> 845<li class="blockList"> 846<h4>WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS</h4> 847<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> 848<div class="block">Feature that controls whether numeric timestamp values are 849 to be written using nanosecond timestamps (enabled) or not (disabled); 850 <b>if and only if</b> datatype supports such resolution. 851 Only newer datatypes (such as Java8 Date/Time) support such resolution -- 852 older types (pre-Java8 <b>java.util.Date</b> etc) and Joda do not -- 853 and this setting <b>has no effect</b> on such types. 854<p> 855 If disabled, standard millisecond timestamps are assumed. 856 This is the counterpart to <a href="../../../../com/fasterxml/jackson/databind/DeserializationFeature.html#READ_DATE_TIMESTAMPS_AS_NANOSECONDS"><code>DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS</code></a>. 857<p> 858 Feature is enabled by default, to support most accurate time values possible.</div> 859<dl> 860<dt><span class="simpleTagLabel">Since:</span></dt> 861<dd>2.2</dd> 862</dl> 863</li> 864</ul> 865<a name="ORDER_MAP_ENTRIES_BY_KEYS"> 866<!-- --> 867</a> 868<ul class="blockList"> 869<li class="blockList"> 870<h4>ORDER_MAP_ENTRIES_BY_KEYS</h4> 871<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> 872<div class="block">Feature that determines whether <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a> entries are first 873 sorted by key before serialization or not: if enabled, additional sorting 874 step is performed if necessary (not necessary for <a href="https://docs.oracle.com/javase/8/docs/api/java/util/SortedMap.html?is-external=true" title="class or interface in java.util"><code>SortedMap</code></a>s), 875 if disabled, no additional sorting is needed. 876<p> 877 Feature is disabled by default.</div> 878</li> 879</ul> 880<a name="EAGER_SERIALIZER_FETCH"> 881<!-- --> 882</a> 883<ul class="blockList"> 884<li class="blockList"> 885<h4>EAGER_SERIALIZER_FETCH</h4> 886<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> 887<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 888 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 889 possible. This improves performance in cases where similarly 890 configured <a href="../../../../com/fasterxml/jackson/databind/ObjectWriter.html" title="class in com.fasterxml.jackson.databind"><code>ObjectWriter</code></a> instance is used multiple 891 times; and should not significantly affect single-use cases. 892<p> 893 Note that there should not be any need to normally disable this 894 feature: only consider that if there are actual perceived problems. 895<p> 896 Feature is enabled by default.</div> 897<dl> 898<dt><span class="simpleTagLabel">Since:</span></dt> 899<dd>2.1</dd> 900</dl> 901</li> 902</ul> 903<a name="USE_EQUALITY_FOR_OBJECT_ID"> 904<!-- --> 905</a> 906<ul class="blockListLast"> 907<li class="blockList"> 908<h4>USE_EQUALITY_FOR_OBJECT_ID</h4> 909<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> 910<div class="block">Feature that determines whether Object Identity is compared using 911 true JVM-level identity of Object (false); or, <code>equals()</code> method. 912 Latter is sometimes useful when dealing with Database-bound objects with 913 ORM libraries (like Hibernate). Note that Object itself is actually compared, 914 and NOT Object Id; naming of this feature is somewhat confusing, so it is important 915 that Object <b>for which identity is to be preserved</b> are considered equal, 916 above and beyond ids (which are always compared using equality anyway). 917<p> 918 NOTE: due to the way functionality is implemented, it is very important that 919 in addition to overriding <a href="https://docs.oracle.com/javase/8/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 920 "same") it is also necessary to ensure that <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang"><code>Object.hashCode()</code></a> is overridden 921 to produce the exact same value for equal instances. 922<p> 923 Feature is disabled by default; meaning that strict identity is used, not 924 <code>equals()</code></div> 925<dl> 926<dt><span class="simpleTagLabel">Since:</span></dt> 927<dd>2.3</dd> 928</dl> 929</li> 930</ul> 931</li> 932</ul> 933<!-- ============ METHOD DETAIL ========== --> 934<ul class="blockList"> 935<li class="blockList"><a name="method.detail"> 936<!-- --> 937</a> 938<h3>Method Detail</h3> 939<a name="values--"> 940<!-- --> 941</a> 942<ul class="blockList"> 943<li class="blockList"> 944<h4>values</h4> 945<pre>public static <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a>[] values()</pre> 946<div class="block">Returns an array containing the constants of this enum type, in 947the order they are declared. This method may be used to iterate 948over the constants as follows: 949<pre> 950for (SerializationFeature c : SerializationFeature.values()) 951 System.out.println(c); 952</pre></div> 953<dl> 954<dt><span class="returnLabel">Returns:</span></dt> 955<dd>an array containing the constants of this enum type, in the order they are declared</dd> 956</dl> 957</li> 958</ul> 959<a name="valueOf-java.lang.String-"> 960<!-- --> 961</a> 962<ul class="blockList"> 963<li class="blockList"> 964<h4>valueOf</h4> 965<pre>public static <a href="../../../../com/fasterxml/jackson/databind/SerializationFeature.html" title="enum in com.fasterxml.jackson.databind">SerializationFeature</a> valueOf(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> 966<div class="block">Returns the enum constant of this type with the specified name. 967The string must match <i>exactly</i> an identifier used to declare an 968enum constant in this type. (Extraneous whitespace characters are 969not permitted.)</div> 970<dl> 971<dt><span class="paramLabel">Parameters:</span></dt> 972<dd><code>name</code> - the name of the enum constant to be returned.</dd> 973<dt><span class="returnLabel">Returns:</span></dt> 974<dd>the enum constant with the specified name</dd> 975<dt><span class="throwsLabel">Throws:</span></dt> 976<dd><code><a href="https://docs.oracle.com/javase/8/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> 977<dd><code><a href="https://docs.oracle.com/javase/8/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> 978</dl> 979</li> 980</ul> 981<a name="enabledByDefault--"> 982<!-- --> 983</a> 984<ul class="blockList"> 985<li class="blockList"> 986<h4>enabledByDefault</h4> 987<pre>public boolean enabledByDefault()</pre> 988<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> 989<div class="block">Accessor for checking whether this feature is enabled by default.</div> 990<dl> 991<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> 992<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> 993</dl> 994</li> 995</ul> 996<a name="getMask--"> 997<!-- --> 998</a> 999<ul class="blockList"> 1000<li class="blockList"> 1001<h4>getMask</h4> 1002<pre>public int getMask()</pre> 1003<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> 1004<div class="block">Returns bit mask for this feature instance</div> 1005<dl> 1006<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> 1007<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> 1008</dl> 1009</li> 1010</ul> 1011<a name="enabledIn-int-"> 1012<!-- --> 1013</a> 1014<ul class="blockListLast"> 1015<li class="blockList"> 1016<h4>enabledIn</h4> 1017<pre>public boolean enabledIn(int flags)</pre> 1018<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> 1019<div class="block">Convenience method for checking whether feature is enabled in given bitmask</div> 1020<dl> 1021<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> 1022<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> 1023</dl> 1024</li> 1025</ul> 1026</li> 1027</ul> 1028</li> 1029</ul> 1030</div> 1031</div> 1032<!-- ========= END OF CLASS DATA ========= --> 1033<!-- ======= START OF BOTTOM NAVBAR ====== --> 1034<div class="bottomNav"><a name="navbar.bottom"> 1035<!-- --> 1036</a> 1037<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> 1038<a name="navbar.bottom.firstrow"> 1039<!-- --> 1040</a> 1041<ul class="navList" title="Navigation"> 1042<li><a href="../../../../overview-summary.html">Overview</a></li> 1043<li><a href="package-summary.html">Package</a></li> 1044<li class="navBarCell1Rev">Class</li> 1045<li><a href="class-use/SerializationFeature.html">Use</a></li> 1046<li><a href="package-tree.html">Tree</a></li> 1047<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 1048<li><a href="../../../../index-all.html">Index</a></li> 1049<li><a href="../../../../help-doc.html">Help</a></li> 1050</ul> 1051</div> 1052<div class="subNav"> 1053<ul class="navList"> 1054<li><a href="../../../../com/fasterxml/jackson/databind/SerializationConfig.html" title="class in com.fasterxml.jackson.databind"><span class="typeNameLink">Prev Class</span></a></li> 1055<li><a href="../../../../com/fasterxml/jackson/databind/SerializerProvider.html" title="class in com.fasterxml.jackson.databind"><span class="typeNameLink">Next Class</span></a></li> 1056</ul> 1057<ul class="navList"> 1058<li><a href="../../../../index.html?com/fasterxml/jackson/databind/SerializationFeature.html" target="_top">Frames</a></li> 1059<li><a href="SerializationFeature.html" target="_top">No Frames</a></li> 1060</ul> 1061<ul class="navList" id="allclasses_navbar_bottom"> 1062<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 1063</ul> 1064<div> 1065<script type="text/javascript"><!-- 1066 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 1067 if(window==top) { 1068 allClassesLink.style.display = "block"; 1069 } 1070 else { 1071 allClassesLink.style.display = "none"; 1072 } 1073 //--> 1074</script> 1075</div> 1076<div> 1077<ul class="subNavList"> 1078<li>Summary: </li> 1079<li>Nested | </li> 1080<li><a href="#enum.constant.summary">Enum Constants</a> | </li> 1081<li>Field | </li> 1082<li><a href="#method.summary">Method</a></li> 1083</ul> 1084<ul class="subNavList"> 1085<li>Detail: </li> 1086<li><a href="#enum.constant.detail">Enum Constants</a> | </li> 1087<li>Field | </li> 1088<li><a href="#method.detail">Method</a></li> 1089</ul> 1090</div> 1091<a name="skip.navbar.bottom"> 1092<!-- --> 1093</a></div> 1094<!-- ======== END OF BOTTOM NAVBAR ======= --> 1095<p class="legalCopy"><small>Copyright © 2008–2019 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p> 1096</body> 1097</html> 1098