1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!--NewPage--> 3<HTML> 4<HEAD> 5<!-- Generated by javadoc (build 1.6.0_35) on Fri Oct 05 20:53:29 PDT 2012 --> 6<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<TITLE> 8JsonIgnore (Jackson-annotations 2.1.0 API) 9</TITLE> 10 11<META NAME="date" CONTENT="2012-10-05"> 12 13<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> 14 15<SCRIPT type="text/javascript"> 16function windowTitle() 17{ 18 if (location.href.indexOf('is-external=true') == -1) { 19 parent.document.title="JsonIgnore (Jackson-annotations 2.1.0 API)"; 20 } 21} 22</SCRIPT> 23<NOSCRIPT> 24</NOSCRIPT> 25 26</HEAD> 27 28<BODY BGCOLOR="white" onload="windowTitle();"> 29<HR> 30 31 32<!-- ========= START OF TOP NAVBAR ======= --> 33<A NAME="navbar_top"><!-- --></A> 34<A HREF="#skip-navbar_top" title="Skip navigation links"></A> 35<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 36<TR> 37<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 38<A NAME="navbar_top_firstrow"><!-- --></A> 39<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 40 <TR ALIGN="center" VALIGN="top"> 41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../com/fasterxml/jackson/annotation/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JsonIgnore.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 48 </TR> 49</TABLE> 50</TD> 51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><script type="text/javascript"><!-- 52google_ad_client = "pub-1467773697956887"; 53/* Jackson-ad-small */ 54google_ad_slot = "6699487946"; 55google_ad_width = 234; 56google_ad_height = 60; 57//--> 58</script> 59<script type="text/javascript" 60src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 61</script> 62</TD> 63</TR> 64 65<TR> 66<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 67 <A HREF="../../../../com/fasterxml/jackson/annotation/JsonIdentityReference.html" title="annotation in com.fasterxml.jackson.annotation"><B>PREV CLASS</B></A> 68 <A HREF="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.html" title="annotation in com.fasterxml.jackson.annotation"><B>NEXT CLASS</B></A></FONT></TD> 69<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 70 <A HREF="../../../../index.html?com/fasterxml/jackson/annotation/JsonIgnore.html" target="_top"><B>FRAMES</B></A> 71 <A HREF="JsonIgnore.html" target="_top"><B>NO FRAMES</B></A> 72 <SCRIPT type="text/javascript"> 73 <!-- 74 if(window==top) { 75 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 76 } 77 //--> 78</SCRIPT> 79<NOSCRIPT> 80 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 81</NOSCRIPT> 82 83 84</FONT></TD> 85</TR> 86<TR> 87<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 88 SUMMARY: REQUIRED | <A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD> 89<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 90DETAIL: <A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD> 91</TR> 92</TABLE> 93<A NAME="skip-navbar_top"></A> 94<!-- ========= END OF TOP NAVBAR ========= --> 95 96<HR> 97<!-- ======== START OF CLASS DATA ======== --> 98<H2> 99<FONT SIZE="-1"> 100com.fasterxml.jackson.annotation</FONT> 101<BR> 102Annotation Type JsonIgnore</H2> 103<HR> 104<DL> 105<DT><PRE><FONT SIZE="-1"><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/annotation/Target.html?is-external=true" title="class or interface in java.lang.annotation">@Target</A>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/annotation/Target.html?is-external=true#value()" title="class or interface in java.lang.annotation">value</A>={<A HREF="http://download.oracle.com/javase/1.5.0/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://download.oracle.com/javase/1.5.0/docs/api/java/lang/annotation/ElementType.html?is-external=true#METHOD" title="class or interface in java.lang.annotation">METHOD</A>,<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/annotation/ElementType.html?is-external=true#CONSTRUCTOR" title="class or interface in java.lang.annotation">CONSTRUCTOR</A>,<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/annotation/ElementType.html?is-external=true#FIELD" title="class or interface in java.lang.annotation">FIELD</A>}) 106<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/annotation/Retention.html?is-external=true" title="class or interface in java.lang.annotation">@Retention</A>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/annotation/Retention.html?is-external=true#value()" title="class or interface in java.lang.annotation">value</A>=<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="class or interface in java.lang.annotation">RUNTIME</A>) 107</FONT>public @interface <B>JsonIgnore</B></DL> 108</PRE> 109 110<P> 111Marker annotation that indicates that the annotated method or field is to be 112 ignored by introspection-based 113 serialization and deserialization functionality. That is, it should 114 not be consider a "getter", "setter" or "creator". 115<p> 116 In addition, starting with Jackson 1.9, if this is the only annotation 117 associated with a property, it will also cause cause the whole 118 property to be ignored: that is, if setter has this annotation and 119 getter has no annotations, getter is also effectively ignored. 120 It is still possible for different accessors to use different 121 annotations; so if only "getter" is to be ignored, other accessors 122 (setter or field) would need explicit annotation to prevent 123 ignoral (usually <A HREF="../../../../com/fasterxml/jackson/annotation/JsonProperty.html" title="annotation in com.fasterxml.jackson.annotation"><CODE>JsonProperty</CODE></A>). 124 <p> 125 For example, a "getter" method that would otherwise denote 126 a property (like, say, "getValue" to suggest property "value") 127 to serialize, would be ignored and no such property would 128 be output unless another annotation defines alternative method to use. 129<p> 130 Before version 1.9, this annotation worked purely on method-by-method (or field-by-field) 131 basis; annotation on one method or field did not imply ignoring other methods 132 or fields. However, with version 1.9 and above, annotations associated 133 with various accessors (getter, setter, field, constructor parameter) of 134 a logical property are combined; meaning that annotations in one (say, setter) 135 can have effects on all of them (if getter or field has nothing indicating 136 otherwise). 137<p> 138 Annotation is usually used just a like a marker annotation, that 139 is, without explicitly defining 'value' argument (which defaults 140 to <code>true</code>): but argument can be explicitly defined. 141 This can be done to override an existing JsonIgnore by explicitly 142 defining one with 'false' argument. 143<p> 144 Annotation is similar to <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/javax/xml/bind.annotation.XmlTransient.html?is-external=true" title="class or interface in javax.xml"><CODE>bind.annotation.XmlTransient</CODE></A> 145<P> 146 147<P> 148<HR> 149 150<P> 151<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 152 153<A NAME="annotation_type_optional_element_summary"><!-- --></A> 154<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 155<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 156<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 157<B>Optional Element Summary</B></FONT></TH> 158</TR> 159<TR BGCOLOR="white" CLASS="TableRowColor"> 160<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 161<CODE> boolean</CODE></FONT></TD> 162<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/annotation/JsonIgnore.html#value()">value</A></B></CODE> 163 164<BR> 165 Optional argument that defines whether this annotation is active 166 or not.</TD> 167</TR> 168</TABLE> 169 170<P> 171<A NAME="value()"><!-- --></A><H3> 172value</H3> 173<PRE> 174public abstract boolean <B>value</B></PRE> 175<DL> 176<DD>Optional argument that defines whether this annotation is active 177 or not. The only use for value 'false' if for overriding purposes 178 (which is not needed often); most likely it is needed for use 179 with "mix-in annotations" (aka "annotation overrides"). 180 For most cases, however, default value of "true" is just fine 181 and should be omitted. 182<P> 183<DD><DL> 184</DL> 185</DD> 186<DD><DL> 187</DL> 188<DL> 189<DT><B>Default:</B><DD>true</DD> 190</DL> 191</DL> 192<!-- ========= END OF CLASS DATA ========= --> 193<HR> 194 195 196<!-- ======= START OF BOTTOM NAVBAR ====== --> 197<A NAME="navbar_bottom"><!-- --></A> 198<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 199<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 200<TR><td rowspan='3'><script type="text/javascript"><!-- 201google_ad_client = "pub-1467773697956887"; 202/* Jackson-ad-small */ 203google_ad_slot = "6699487946"; 204google_ad_width = 234; 205google_ad_height = 60; 206//--> 207</script> 208<script type="text/javascript" 209src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 210</script> 211<!-- GA --> 212<script type="text/javascript"> 213var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); 214document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); 215</script> 216<script type="text/javascript"> 217try { 218var pageTracker = _gat._getTracker("UA-140287-6"); 219pageTracker._trackPageview(); 220} catch(err) {} 221</script> 222</td> 223<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 224<A NAME="navbar_bottom_firstrow"><!-- --></A> 225<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 226 <TR ALIGN="center" VALIGN="top"> 227 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../com/fasterxml/jackson/annotation/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 228 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 229 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JsonIgnore.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 230 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 231 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 232 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 233 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 234 </TR> 235</TABLE> 236</TD> 237<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 238</EM> 239</TD> 240</TR> 241 242<TR> 243<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 244 <A HREF="../../../../com/fasterxml/jackson/annotation/JsonIdentityReference.html" title="annotation in com.fasterxml.jackson.annotation"><B>PREV CLASS</B></A> 245 <A HREF="../../../../com/fasterxml/jackson/annotation/JsonIgnoreProperties.html" title="annotation in com.fasterxml.jackson.annotation"><B>NEXT CLASS</B></A></FONT></TD> 246<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 247 <A HREF="../../../../index.html?com/fasterxml/jackson/annotation/JsonIgnore.html" target="_top"><B>FRAMES</B></A> 248 <A HREF="JsonIgnore.html" target="_top"><B>NO FRAMES</B></A> 249 <SCRIPT type="text/javascript"> 250 <!-- 251 if(window==top) { 252 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 253 } 254 //--> 255</SCRIPT> 256<NOSCRIPT> 257 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 258</NOSCRIPT> 259 260 261</FONT></TD> 262</TR> 263<TR> 264<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 265 SUMMARY: REQUIRED | <A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD> 266<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 267DETAIL: <A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD> 268</TR> 269</TABLE> 270<A NAME="skip-navbar_bottom"></A> 271<!-- ======== END OF BOTTOM NAVBAR ======= --> 272 273<HR> 274Copyright © 2012 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved. 275</BODY> 276</HTML> 277