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