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 Wed Sep 25 19:26:34 PDT 2019 --> 6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<title>JsonIgnoreProperties (Jackson-annotations 2.10.0 API)</title> 8<meta name="date" content="2019-09-25"> 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="JsonIgnoreProperties (Jackson-annotations 2.10.0 API)"; 17 } 18 } 19 catch(err) { 20 } 21//--> 22</script> 23<noscript> 24<div>JavaScript is disabled on your browser.</div> 25</noscript> 26<!-- ========= START OF TOP NAVBAR ======= --> 27<div class="topNav"><a name="navbar.top"> 28<!-- --> 29</a> 30<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> 31<a name="navbar.top.firstrow"> 32<!-- --> 33</a> 34<ul class="navList" title="Navigation"> 35<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 36<li class="navBarCell1Rev">Class</li> 37<li><a href="class-use/JsonIgnoreProperties.html">Use</a></li> 38<li><a href="package-tree.html">Tree</a></li> 39<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 40<li><a href="../../../../index-all.html">Index</a></li> 41<li><a href="../../../../help-doc.html">Help</a></li> 42</ul> 43</div> 44<div class="subNav"> 45<ul class="navList"> 46<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnore.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Prev Class</span></a></li> 47<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.Value.html" title="class in com.fasterxml.jackson.annotation"><span class="typeNameLink">Next Class</span></a></li> 48</ul> 49<ul class="navList"> 50<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonIgnoreProperties.html" target="_top">Frames</a></li> 51<li><a href="JsonIgnoreProperties.html" target="_top">No Frames</a></li> 52</ul> 53<ul class="navList" id="allclasses_navbar_top"> 54<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 55</ul> 56<div> 57<script type="text/javascript"><!-- 58 allClassesLink = document.getElementById("allclasses_navbar_top"); 59 if(window==top) { 60 allClassesLink.style.display = "block"; 61 } 62 else { 63 allClassesLink.style.display = "none"; 64 } 65 //--> 66</script> 67</div> 68<div> 69<ul class="subNavList"> 70<li>Summary: </li> 71<li>Field | </li> 72<li>Required | </li> 73<li><a href="#annotation.type.optional.element.summary">Optional</a></li> 74</ul> 75<ul class="subNavList"> 76<li>Detail: </li> 77<li>Field | </li> 78<li><a href="#annotation.type.element.detail">Element</a></li> 79</ul> 80</div> 81<a name="skip.navbar.top"> 82<!-- --> 83</a></div> 84<!-- ========= END OF TOP NAVBAR ========= --> 85<!-- ======== START OF CLASS DATA ======== --> 86<div class="header"> 87<div class="subTitle">com.fasterxml.jackson.annotation</div> 88<h2 title="Annotation Type JsonIgnoreProperties" class="title">Annotation Type JsonIgnoreProperties</h2> 89</div> 90<div class="contentContainer"> 91<div class="description"> 92<ul class="blockList"> 93<li class="blockList"> 94<hr> 95<br> 96<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true" title="class or interface in java.lang.annotation">@Target</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>={<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#ANNOTATION_TYPE" title="class or interface in java.lang.annotation">ANNOTATION_TYPE</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#TYPE" title="class or interface in java.lang.annotation">TYPE</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#METHOD" title="class or interface in java.lang.annotation">METHOD</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#CONSTRUCTOR" title="class or interface in java.lang.annotation">CONSTRUCTOR</a>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#FIELD" title="class or interface in java.lang.annotation">FIELD</a>}) 97 <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true" title="class or interface in java.lang.annotation">@Retention</a>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>=<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="class or interface in java.lang.annotation">RUNTIME</a>) 98public @interface <span class="memberNameLabel">JsonIgnoreProperties</span></pre> 99<div class="block">Annotation that can be used to either suppress serialization of 100 properties (during serialization), or ignore processing of 101 JSON properties read (during deserialization). 102<p> 103 Example: 104<pre> 105 // to prevent specified fields from being serialized or deserialized 106 // (i.e. not include in JSON output; or being set even if they were included) 107 @JsonIgnoreProperties({ "internalId", "secretKey" }) 108 // To ignore any unknown properties in JSON input without exception: 109 @JsonIgnoreProperties(ignoreUnknown=true) 110</pre> 111<p> 112 Annotation can be applied both to classes and 113 to properties. If used for both, actual set will be union of all 114 ignorals: that is, you can only add properties to ignore, not remove 115 or override. So you can not remove properties to ignore using 116 per-property annotation.</div> 117</li> 118</ul> 119</div> 120<div class="summary"> 121<ul class="blockList"> 122<li class="blockList"> 123<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 124<ul class="blockList"> 125<li class="blockList"><a name="annotation.type.optional.element.summary"> 126<!-- --> 127</a> 128<h3>Optional Element Summary</h3> 129<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> 130<caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> 131<tr> 132<th class="colFirst" scope="col">Modifier and Type</th> 133<th class="colLast" scope="col">Optional Element and Description</th> 134</tr> 135<tr class="altColor"> 136<td class="colFirst"><code>boolean</code></td> 137<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.html#allowGetters--">allowGetters</a></span></code> 138<div class="block">Property that can be enabled to allow "getters" to be used (that is, 139 prevent ignoral of getters for properties listed in <a href="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.html#value--"><code>value()</code></a>).</div> 140</td> 141</tr> 142<tr class="rowColor"> 143<td class="colFirst"><code>boolean</code></td> 144<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.html#allowSetters--">allowSetters</a></span></code> 145<div class="block">Property that can be enabled to allow "setters" to be used (that is, 146 prevent ignoral of setters for properties listed in <a href="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.html#value--"><code>value()</code></a>).</div> 147</td> 148</tr> 149<tr class="altColor"> 150<td class="colFirst"><code>boolean</code></td> 151<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.html#ignoreUnknown--">ignoreUnknown</a></span></code> 152<div class="block">Property that defines whether it is ok to just ignore any 153 unrecognized properties during deserialization.</div> 154</td> 155</tr> 156<tr class="rowColor"> 157<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td> 158<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.html#value--">value</a></span></code> 159<div class="block">Names of properties to ignore.</div> 160</td> 161</tr> 162</table> 163</li> 164</ul> 165</li> 166</ul> 167</div> 168<div class="details"> 169<ul class="blockList"> 170<li class="blockList"> 171<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 172<ul class="blockList"> 173<li class="blockList"><a name="annotation.type.element.detail"> 174<!-- --> 175</a> 176<h3>Element Detail</h3> 177<a name="value--"> 178<!-- --> 179</a> 180<ul class="blockList"> 181<li class="blockList"> 182<h4>value</h4> 183<pre>public abstract <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] value</pre> 184<div class="block">Names of properties to ignore.</div> 185<dl> 186<dt>Default:</dt> 187<dd>{}</dd> 188</dl> 189</li> 190</ul> 191</li> 192</ul> 193<ul class="blockList"> 194<li class="blockList"><a name="ignoreUnknown--"> 195<!-- --> 196</a> 197<ul class="blockList"> 198<li class="blockList"> 199<h4>ignoreUnknown</h4> 200<pre>public abstract boolean ignoreUnknown</pre> 201<div class="block">Property that defines whether it is ok to just ignore any 202 unrecognized properties during deserialization. 203 If true, all properties that are unrecognized -- that is, 204 there are no setters or creators that accept them -- are 205 ignored without warnings (although handlers for unknown 206 properties, if any, will still be called) without 207 exception. 208<p> 209 Does not have any effect on serialization.</div> 210<dl> 211<dt><span class="returnLabel">Returns:</span></dt> 212<dd>True if any and all unknown properties are to be ignored without 213 exceptions (or other special handling); false otherwise.</dd> 214</dl> 215<dl> 216<dt>Default:</dt> 217<dd>false</dd> 218</dl> 219</li> 220</ul> 221</li> 222</ul> 223<ul class="blockList"> 224<li class="blockList"><a name="allowGetters--"> 225<!-- --> 226</a> 227<ul class="blockList"> 228<li class="blockList"> 229<h4>allowGetters</h4> 230<pre>public abstract boolean allowGetters</pre> 231<div class="block">Property that can be enabled to allow "getters" to be used (that is, 232 prevent ignoral of getters for properties listed in <a href="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.html#value--"><code>value()</code></a>). 233 This is commonly set to support defining "read-only" properties; ones 234 for which there is a getter, but no matching setter: in this case, 235 properties should be ignored for deserialization but NOT serialization. 236 Another way to think about this setting is that setting it to `true` 237 will "disable" ignoring of getters. 238<p> 239 Default value is `false`, which means that getters with matching names 240 will be ignored.</div> 241<dl> 242<dt><span class="returnLabel">Returns:</span></dt> 243<dd>True if getters should be allowed (i.e. NOT ignored); false if getters 244 are to be ignored</dd> 245<dt><span class="simpleTagLabel">Since:</span></dt> 246<dd>2.6</dd> 247</dl> 248<dl> 249<dt>Default:</dt> 250<dd>false</dd> 251</dl> 252</li> 253</ul> 254</li> 255</ul> 256<ul class="blockList"> 257<li class="blockList"><a name="allowSetters--"> 258<!-- --> 259</a> 260<ul class="blockListLast"> 261<li class="blockList"> 262<h4>allowSetters</h4> 263<pre>public abstract boolean allowSetters</pre> 264<div class="block">Property that can be enabled to allow "setters" to be used (that is, 265 prevent ignoral of setters for properties listed in <a href="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.html#value--"><code>value()</code></a>). 266 This could be used to specify "write-only" properties; ones 267 that should not be serialized out, but that may be provided in for 268 deserialization. 269 Another way to think about this setting is that setting it to `true` 270 will "disable" ignoring of setters. 271<p> 272 Default value is `false`, which means that setters with matching names 273 will be ignored.</div> 274<dl> 275<dt><span class="returnLabel">Returns:</span></dt> 276<dd>True if setters should be allowed (i.e. NOT ignored); false if setters 277 are to be ignored</dd> 278<dt><span class="simpleTagLabel">Since:</span></dt> 279<dd>2.6</dd> 280</dl> 281<dl> 282<dt>Default:</dt> 283<dd>false</dd> 284</dl> 285</li> 286</ul> 287</li> 288</ul> 289</li> 290</ul> 291</div> 292</div> 293<!-- ========= END OF CLASS DATA ========= --> 294<!-- ======= START OF BOTTOM NAVBAR ====== --> 295<div class="bottomNav"><a name="navbar.bottom"> 296<!-- --> 297</a> 298<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> 299<a name="navbar.bottom.firstrow"> 300<!-- --> 301</a> 302<ul class="navList" title="Navigation"> 303<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 304<li class="navBarCell1Rev">Class</li> 305<li><a href="class-use/JsonIgnoreProperties.html">Use</a></li> 306<li><a href="package-tree.html">Tree</a></li> 307<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 308<li><a href="../../../../index-all.html">Index</a></li> 309<li><a href="../../../../help-doc.html">Help</a></li> 310</ul> 311</div> 312<div class="subNav"> 313<ul class="navList"> 314<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnore.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Prev Class</span></a></li> 315<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.Value.html" title="class in com.fasterxml.jackson.annotation"><span class="typeNameLink">Next Class</span></a></li> 316</ul> 317<ul class="navList"> 318<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonIgnoreProperties.html" target="_top">Frames</a></li> 319<li><a href="JsonIgnoreProperties.html" target="_top">No Frames</a></li> 320</ul> 321<ul class="navList" id="allclasses_navbar_bottom"> 322<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 323</ul> 324<div> 325<script type="text/javascript"><!-- 326 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 327 if(window==top) { 328 allClassesLink.style.display = "block"; 329 } 330 else { 331 allClassesLink.style.display = "none"; 332 } 333 //--> 334</script> 335</div> 336<div> 337<ul class="subNavList"> 338<li>Summary: </li> 339<li>Field | </li> 340<li>Required | </li> 341<li><a href="#annotation.type.optional.element.summary">Optional</a></li> 342</ul> 343<ul class="subNavList"> 344<li>Detail: </li> 345<li>Field | </li> 346<li><a href="#annotation.type.element.detail">Element</a></li> 347</ul> 348</div> 349<a name="skip.navbar.bottom"> 350<!-- --> 351</a></div> 352<!-- ======== END OF BOTTOM NAVBAR ======= --> 353<p class="legalCopy"><small>Copyright © 2008–2019 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p> 354</body> 355</html> 356