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>JsonIgnore (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="JsonIgnore (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/JsonIgnore.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/JsonIdentityReference.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 40<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.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/JsonIgnore.html" target="_top">Frames</a></li> 44<li><a href="JsonIgnore.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 JsonIgnore" class="title">Annotation Type JsonIgnore</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#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">JsonIgnore</span></pre> 90<div class="block">Marker annotation that indicates that the annotated method or field is to be 91 ignored by introspection-based 92 serialization and deserialization functionality. That is, it should 93 not be consider a "getter", "setter" or "creator". 94<p> 95 In addition, starting with Jackson 1.9, if this is the only annotation 96 associated with a property, it will also cause cause the whole 97 property to be ignored: that is, if setter has this annotation and 98 getter has no annotations, getter is also effectively ignored. 99 It is still possible for different accessors to use different 100 annotations; so if only "getter" is to be ignored, other accessors 101 (setter or field) would need explicit annotation to prevent 102 ignoral (usually <a href="../../../../com/fasterxml/jackson/annotation/JsonProperty.html" title="annotation in com.fasterxml.jackson.annotation"><code>JsonProperty</code></a>). 103 <p> 104 For example, a "getter" method that would otherwise denote 105 a property (like, say, "getValue" to suggest property "value") 106 to serialize, would be ignored and no such property would 107 be output unless another annotation defines alternative method to use. 108<p> 109 Before version 1.9, this annotation worked purely on method-by-method (or field-by-field) 110 basis; annotation on one method or field did not imply ignoring other methods 111 or fields. However, with version 1.9 and above, annotations associated 112 with various accessors (getter, setter, field, constructor parameter) of 113 a logical property are combined; meaning that annotations in one (say, setter) 114 can have effects on all of them (if getter or field has nothing indicating 115 otherwise). 116<p> 117 Annotation is usually used just a like a marker annotation, that 118 is, without explicitly defining 'value' argument (which defaults 119 to <code>true</code>): but argument can be explicitly defined. 120 This can be done to override an existing JsonIgnore by explicitly 121 defining one with 'false' argument. 122<p> 123 Annotation is similar to <a href="http://docs.oracle.com/javase/6/docs/api/javax/xml/bind/annotation/XmlTransient.html?is-external=true" title="class or interface in javax.xml.bind.annotation"><code>XmlTransient</code></a></div> 124</li> 125</ul> 126</div> 127<div class="summary"> 128<ul class="blockList"> 129<li class="blockList"> 130<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 131<ul class="blockList"> 132<li class="blockList"><a name="annotation_type_optional_element_summary"> 133<!-- --> 134</a> 135<h3>Optional Element Summary</h3> 136<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> 137<caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> 138<tr> 139<th class="colFirst" scope="col">Modifier and Type</th> 140<th class="colLast" scope="col">Optional Element and Description</th> 141</tr> 142<tr class="altColor"> 143<td class="colFirst"><code>boolean</code></td> 144<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnore.html#value()">value</a></strong></code> 145<div class="block">Optional argument that defines whether this annotation is active 146 or not.</div> 147</td> 148</tr> 149</table> 150</li> 151</ul> 152</li> 153</ul> 154</div> 155<div class="details"> 156<ul class="blockList"> 157<li class="blockList"> 158<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 159<ul class="blockList"> 160<li class="blockList"><a name="annotation_type_element_detail"> 161<!-- --> 162</a> 163<h3>Element Detail</h3> 164<a name="value()"> 165<!-- --> 166</a> 167<ul class="blockListLast"> 168<li class="blockList"> 169<h4>value</h4> 170<pre>public abstract boolean value</pre> 171<div class="block">Optional argument that defines whether this annotation is active 172 or not. The only use for value 'false' if for overriding purposes 173 (which is not needed often); most likely it is needed for use 174 with "mix-in annotations" (aka "annotation overrides"). 175 For most cases, however, default value of "true" is just fine 176 and should be omitted.</div> 177<dl> 178<dt>Default:</dt> 179<dd>true</dd> 180</dl> 181</li> 182</ul> 183</li> 184</ul> 185</li> 186</ul> 187</div> 188</div> 189<!-- ========= END OF CLASS DATA ========= --> 190<!-- ======= START OF BOTTOM NAVBAR ====== --> 191<div class="bottomNav"><a name="navbar_bottom"> 192<!-- --> 193</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 194<!-- --> 195</a> 196<ul class="navList" title="Navigation"> 197<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 198<li class="navBarCell1Rev">Class</li> 199<li><a href="class-use/JsonIgnore.html">Use</a></li> 200<li><a href="package-tree.html">Tree</a></li> 201<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 202<li><a href="../../../../index-all.html">Index</a></li> 203<li><a href="../../../../help-doc.html">Help</a></li> 204</ul> 205</div> 206<div class="subNav"> 207<ul class="navList"> 208<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityReference.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 209<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li> 210</ul> 211<ul class="navList"> 212<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonIgnore.html" target="_top">Frames</a></li> 213<li><a href="JsonIgnore.html" target="_top">No Frames</a></li> 214</ul> 215<ul class="navList" id="allclasses_navbar_bottom"> 216<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 217</ul> 218<div> 219<script type="text/javascript"><!-- 220 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 221 if(window==top) { 222 allClassesLink.style.display = "block"; 223 } 224 else { 225 allClassesLink.style.display = "none"; 226 } 227 //--> 228</script> 229</div> 230<div> 231<ul class="subNavList"> 232<li>Summary: </li> 233<li>Required | </li> 234<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 235</ul> 236<ul class="subNavList"> 237<li>Detail: </li> 238<li><a href="#annotation_type_element_detail">Element</a></li> 239</ul> 240</div> 241<a name="skip-navbar_bottom"> 242<!-- --> 243</a></div> 244<!-- ======== END OF BOTTOM NAVBAR ======= --> 245<p class="legalCopy"><small>Copyright © 2014–2015 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p> 246</body> 247</html> 248