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 Tue Oct 09 17:08:06 PDT 2012 --> 6<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<TITLE> 8JsonDeserializer (jackson-databind 2.1.0 API) 9</TITLE> 10 11<META NAME="date" CONTENT="2012-10-09"> 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="JsonDeserializer (jackson-databind 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="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 43 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JsonDeserializer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 48 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 49 </TR> 50</TABLE> 51</TD> 52<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 53</EM> 54</TD> 55</TR> 56 57<TR> 58<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 59 <A HREF="../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind"><B>PREV CLASS</B></A> 60 <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.None.html" title="class in com.fasterxml.jackson.databind"><B>NEXT CLASS</B></A></FONT></TD> 61<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 62 <A HREF="../../../../index.html?com/fasterxml/jackson/databind/JsonDeserializer.html" target="_top"><B>FRAMES</B></A> 63 <A HREF="JsonDeserializer.html" target="_top"><B>NO FRAMES</B></A> 64 <SCRIPT type="text/javascript"> 65 <!-- 66 if(window==top) { 67 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 68 } 69 //--> 70</SCRIPT> 71<NOSCRIPT> 72 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 73</NOSCRIPT> 74 75 76</FONT></TD> 77</TR> 78<TR> 79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 80 SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> 81<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 82DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> 83</TR> 84</TABLE> 85<A NAME="skip-navbar_top"></A> 86<!-- ========= END OF TOP NAVBAR ========= --> 87 88<HR> 89<!-- ======== START OF CLASS DATA ======== --> 90<H2> 91<FONT SIZE="-1"> 92com.fasterxml.jackson.databind</FONT> 93<BR> 94Class JsonDeserializer<T></H2> 95<PRE> 96<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> 97 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.fasterxml.jackson.databind.JsonDeserializer<T></B> 98</PRE> 99<DL> 100<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../com/fasterxml/jackson/databind/deser/AbstractDeserializer.html" title="class in com.fasterxml.jackson.databind.deser">AbstractDeserializer</A>, <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.None.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer.None</A>, <A HREF="../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">StdDeserializer</A>, <A HREF="../../../../com/fasterxml/jackson/databind/deser/impl/TypeWrappedDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.impl">TypeWrappedDeserializer</A></DD> 101</DL> 102<HR> 103<DL> 104<DT><PRE>public abstract class <B>JsonDeserializer<T></B><DT>extends <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL> 105</PRE> 106 107<P> 108Abstract class that defines API used by <A HREF="../../../../com/fasterxml/jackson/databind/ObjectMapper.html" title="class in com.fasterxml.jackson.databind"><CODE>ObjectMapper</CODE></A> (and 109 other chained <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind"><CODE>JsonDeserializer</CODE></A>s too) to deserialize Objects of 110 arbitrary types from JSON, using provided <A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core"><CODE>JsonParser</CODE></A>. 111<p> 112 Custom deserializers should usually not directly extend this class, 113 but instead extend <A HREF="../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std"><CODE>StdDeserializer</CODE></A> 114 (or its subtypes like <A HREF="../../../../com/fasterxml/jackson/databind/deser/std/StdScalarDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std"><CODE>StdScalarDeserializer</CODE></A>). 115<p> 116 If deserializer is an aggregate one -- meaning it delegates handling of some 117 of its contents by using other deserializer(s) -- it typically also needs 118 to implement <A HREF="../../../../com/fasterxml/jackson/databind/deser/ResolvableDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><CODE>ResolvableDeserializer</CODE></A>, 119 which can locate dependant deserializers. This is important to allow dynamic 120 overrides of deserializers; separate call interface is needed to separate 121 resolution of dependant deserializers (which may have cyclic link back 122 to deserializer itself, directly or indirectly). 123<p> 124 In addition, to support per-property annotations (to configure aspects 125 of deserialization on per-property basis), deserializers may want 126 to implement 127 <A HREF="../../../../com/fasterxml/jackson/databind/deser/ContextualDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><CODE>ContextualDeserializer</CODE></A>, 128 which allows specialization of deserializers: call to 129 <A HREF="../../../../com/fasterxml/jackson/databind/deser/ContextualDeserializer.html#createContextual(com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.BeanProperty)"><CODE>ContextualDeserializer.createContextual(com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.BeanProperty)</CODE></A> 130 is passed information on property, and can create a newly configured 131 deserializer for handling that particular property. 132<p> 133 If both 134 <A HREF="../../../../com/fasterxml/jackson/databind/deser/ResolvableDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><CODE>ResolvableDeserializer</CODE></A> and 135 <A HREF="../../../../com/fasterxml/jackson/databind/deser/ContextualDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><CODE>ContextualDeserializer</CODE></A> 136 are implemented, resolution of deserializers occurs before 137 contextualization. 138<P> 139 140<P> 141<HR> 142 143<P> 144<!-- ======== NESTED CLASS SUMMARY ======== --> 145 146<A NAME="nested_class_summary"><!-- --></A> 147<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 148<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 149<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 150<B>Nested Class Summary</B></FONT></TH> 151</TR> 152<TR BGCOLOR="white" CLASS="TableRowColor"> 153<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 154<CODE>static class</CODE></FONT></TD> 155<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.None.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer.None</A></B></CODE> 156 157<BR> 158 This marker class is only to be used with annotations, to 159 indicate that <b>no deserializer is configured</b>.</TD> 160</TR> 161</TABLE> 162 163<!-- ======== CONSTRUCTOR SUMMARY ======== --> 164 165<A NAME="constructor_summary"><!-- --></A> 166<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 167<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 168<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 169<B>Constructor Summary</B></FONT></TH> 170</TR> 171<TR BGCOLOR="white" CLASS="TableRowColor"> 172<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#JsonDeserializer()">JsonDeserializer</A></B>()</CODE> 173 174<BR> 175 </TD> 176</TR> 177</TABLE> 178 179<!-- ========== METHOD SUMMARY =========== --> 180 181<A NAME="method_summary"><!-- --></A> 182<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 183<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 184<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 185<B>Method Summary</B></FONT></TH> 186</TR> 187<TR BGCOLOR="white" CLASS="TableRowColor"> 188<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 189<CODE>abstract <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A></CODE></FONT></TD> 190<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">deserialize</A></B>(<A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</A> jp, 191 <A HREF="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt)</CODE> 192 193<BR> 194 Method that can be called to ask implementation to deserialize 195 JSON content into the value type this serializer handles.</TD> 196</TR> 197<TR BGCOLOR="white" CLASS="TableRowColor"> 198<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 199<CODE> <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A></CODE></FONT></TD> 200<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, T)">deserialize</A></B>(<A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</A> jp, 201 <A HREF="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt, 202 <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A> intoValue)</CODE> 203 204<BR> 205 Alternate deserialization method (compared to the most commonly 206 used, <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)"><CODE>deserialize(JsonParser, DeserializationContext)</CODE></A>), 207 which takes in initialized value instance, to be 208 configured and/or populated by deserializer.</TD> 209</TR> 210<TR BGCOLOR="white" CLASS="TableRowColor"> 211<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 212<CODE> <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD> 213<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#deserializeWithType(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.jsontype.TypeDeserializer)">deserializeWithType</A></B>(<A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</A> jp, 214 <A HREF="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt, 215 <A HREF="../../../../com/fasterxml/jackson/databind/jsontype/TypeDeserializer.html" title="class in com.fasterxml.jackson.databind.jsontype">TypeDeserializer</A> typeDeserializer)</CODE> 216 217<BR> 218 Deserialization called when type being deserialized is defined to 219 contain additional type identifier, to allow for correctly 220 instantiating correct subtype.</TD> 221</TR> 222<TR BGCOLOR="white" CLASS="TableRowColor"> 223<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 224<CODE> <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A><?></CODE></FONT></TD> 225<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getDelegatee()">getDelegatee</A></B>()</CODE> 226 227<BR> 228 Accessor that can be used to determine if this deserializer uses 229 another deserializer for actual deserialization, by delegating 230 calls.</TD> 231</TR> 232<TR BGCOLOR="white" CLASS="TableRowColor"> 233<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 234<CODE> <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A></CODE></FONT></TD> 235<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getEmptyValue()">getEmptyValue</A></B>()</CODE> 236 237<BR> 238 Method called to determine value to be used for "empty" values 239 (most commonly when deserializing from empty JSON Strings).</TD> 240</TR> 241<TR BGCOLOR="white" CLASS="TableRowColor"> 242<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 243<CODE> <A HREF="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>></CODE></FONT></TD> 244<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getKnownPropertyNames()">getKnownPropertyNames</A></B>()</CODE> 245 246<BR> 247 Method that will 248 either return null to indicate that type being deserializers 249 has no concept of properties; or a collection of identifiers 250 for which <code>toString</code> will give external property 251 name.</TD> 252</TR> 253<TR BGCOLOR="white" CLASS="TableRowColor"> 254<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 255<CODE> <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A></CODE></FONT></TD> 256<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getNullValue()">getNullValue</A></B>()</CODE> 257 258<BR> 259 Method that can be called to determine value to be used for 260 representing null values (values deserialized when JSON token 261 is <A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonToken.html?is-external=true#VALUE_NULL" title="class or interface in com.fasterxml.jackson.core"><CODE>JsonToken.VALUE_NULL</CODE></A>).</TD> 262</TR> 263<TR BGCOLOR="white" CLASS="TableRowColor"> 264<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 265<CODE> <A HREF="../../../../com/fasterxml/jackson/databind/deser/impl/ObjectIdReader.html" title="class in com.fasterxml.jackson.databind.deser.impl">ObjectIdReader</A></CODE></FONT></TD> 266<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getObjectIdReader()">getObjectIdReader</A></B>()</CODE> 267 268<BR> 269 Accessor that can be used to check whether this deserializer 270 is expecting to possibly get an Object Identifier value instead of full value 271 serialization, and if so, should be able to resolve it to actual 272 Object instance to return as deserialized value.</TD> 273</TR> 274<TR BGCOLOR="white" CLASS="TableRowColor"> 275<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 276<CODE> boolean</CODE></FONT></TD> 277<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#isCachable()">isCachable</A></B>()</CODE> 278 279<BR> 280 Method called to see if deserializer instance is cachable and 281 usable for other properties of same type (type for which instance 282 was created).</TD> 283</TR> 284<TR BGCOLOR="white" CLASS="TableRowColor"> 285<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 286<CODE> <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A><?></CODE></FONT></TD> 287<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#replaceDelegatee(com.fasterxml.jackson.databind.JsonDeserializer)">replaceDelegatee</A></B>(<A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A><?> delegatee)</CODE> 288 289<BR> 290 Method that can be called to try to replace deserializer this deserializer 291 delegates calls to.</TD> 292</TR> 293<TR BGCOLOR="white" CLASS="TableRowColor"> 294<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 295<CODE> <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A><<A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A>></CODE></FONT></TD> 296<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#unwrappingDeserializer(com.fasterxml.jackson.databind.util.NameTransformer)">unwrappingDeserializer</A></B>(<A HREF="../../../../com/fasterxml/jackson/databind/util/NameTransformer.html" title="class in com.fasterxml.jackson.databind.util">NameTransformer</A> unwrapper)</CODE> 297 298<BR> 299 Method that will return deserializer instance that is able 300 to handle "unwrapped" value instances 301 If no unwrapped instance can be constructed, will simply 302 return this object as-is.</TD> 303</TR> 304</TABLE> 305 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 306<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 307<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 308<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> 309</TR> 310<TR BGCOLOR="white" CLASS="TableRowColor"> 311<TD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> 312</TR> 313</TABLE> 314 315<P> 316 317<!-- ========= CONSTRUCTOR DETAIL ======== --> 318 319<A NAME="constructor_detail"><!-- --></A> 320<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 321<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 322<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 323<B>Constructor Detail</B></FONT></TH> 324</TR> 325</TABLE> 326 327<A NAME="JsonDeserializer()"><!-- --></A><H3> 328JsonDeserializer</H3> 329<PRE> 330public <B>JsonDeserializer</B>()</PRE> 331<DL> 332</DL> 333 334<!-- ============ METHOD DETAIL ========== --> 335 336<A NAME="method_detail"><!-- --></A> 337<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 338<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 339<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 340<B>Method Detail</B></FONT></TH> 341</TR> 342</TABLE> 343 344<A NAME="deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)"><!-- --></A><H3> 345deserialize</H3> 346<PRE> 347public abstract <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A> <B>deserialize</B>(<A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</A> jp, 348 <A HREF="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt) 349 throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A>, 350 <A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></PRE> 351<DL> 352<DD>Method that can be called to ask implementation to deserialize 353 JSON content into the value type this serializer handles. 354 Returned instance is to be constructed by method itself. 355<p> 356 Pre-condition for this method is that the parser points to the 357 first event that is part of value to deserializer (and which 358 is never JSON 'null' literal, more on this below): for simple 359 types it may be the only value; and for structured types the 360 Object start marker. 361 Post-condition is that the parser will point to the last 362 event that is part of deserialized value (or in case deserialization 363 fails, event that was not recognized or usable, which may be 364 the same event as the one it pointed to upon call). 365<p> 366 Note that this method is never called for JSON null literal, 367 and thus deserializers need (and should) not check for it. 368<P> 369<DD><DL> 370<DT><B>Parameters:</B><DD><CODE>jp</CODE> - Parsed used for reading JSON content<DD><CODE>ctxt</CODE> - Context that can be used to access information about 371 this deserialization activity. 372<DT><B>Returns:</B><DD>Deserializer value 373<DT><B>Throws:</B> 374<DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> 375<DD><CODE><A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></CODE></DL> 376</DD> 377</DL> 378<HR> 379 380<A NAME="deserialize(com.fasterxml.jackson.core.JsonParser,com.fasterxml.jackson.databind.DeserializationContext,java.lang.Object)"><!-- --></A><A NAME="deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, T)"><!-- --></A><H3> 381deserialize</H3> 382<PRE> 383public <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A> <B>deserialize</B>(<A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</A> jp, 384 <A HREF="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt, 385 <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A> intoValue) 386 throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A>, 387 <A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></PRE> 388<DL> 389<DD>Alternate deserialization method (compared to the most commonly 390 used, <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)"><CODE>deserialize(JsonParser, DeserializationContext)</CODE></A>), 391 which takes in initialized value instance, to be 392 configured and/or populated by deserializer. 393 Method is not necessarily used for all supported types; most commonly 394 it is used 395 for Collections and Maps. 396<p> 397 Default implementation just throws 398 <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang"><CODE>UnsupportedOperationException</CODE></A>, to indicate that types 399 that do not explicitly add support do not necessarily support 400 update-existing-value operation (esp. immutable types) 401<P> 402<DD><DL> 403 404<DT><B>Throws:</B> 405<DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> 406<DD><CODE><A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></CODE></DL> 407</DD> 408</DL> 409<HR> 410 411<A NAME="deserializeWithType(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.jsontype.TypeDeserializer)"><!-- --></A><H3> 412deserializeWithType</H3> 413<PRE> 414public <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <B>deserializeWithType</B>(<A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</A> jp, 415 <A HREF="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt, 416 <A HREF="../../../../com/fasterxml/jackson/databind/jsontype/TypeDeserializer.html" title="class in com.fasterxml.jackson.databind.jsontype">TypeDeserializer</A> typeDeserializer) 417 throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A>, 418 <A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></PRE> 419<DL> 420<DD>Deserialization called when type being deserialized is defined to 421 contain additional type identifier, to allow for correctly 422 instantiating correct subtype. This can be due to annotation on 423 type (or its supertype), or due to global settings without 424 annotations. 425<p> 426 Default implementation may work for some types, but ideally subclasses 427 should not rely on current default implementation. 428 Implementation is mostly provided to avoid compilation errors with older 429 code. 430<P> 431<DD><DL> 432<DT><B>Parameters:</B><DD><CODE>typeDeserializer</CODE> - Deserializer to use for handling type information 433<DT><B>Throws:</B> 434<DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE> 435<DD><CODE><A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></CODE></DL> 436</DD> 437</DL> 438<HR> 439 440<A NAME="unwrappingDeserializer(com.fasterxml.jackson.databind.util.NameTransformer)"><!-- --></A><H3> 441unwrappingDeserializer</H3> 442<PRE> 443public <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A><<A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A>> <B>unwrappingDeserializer</B>(<A HREF="../../../../com/fasterxml/jackson/databind/util/NameTransformer.html" title="class in com.fasterxml.jackson.databind.util">NameTransformer</A> unwrapper)</PRE> 444<DL> 445<DD>Method that will return deserializer instance that is able 446 to handle "unwrapped" value instances 447 If no unwrapped instance can be constructed, will simply 448 return this object as-is. 449<p> 450 Default implementation just returns 'this' 451 indicating that no unwrapped variant exists 452<P> 453<DD><DL> 454</DL> 455</DD> 456</DL> 457<HR> 458 459<A NAME="replaceDelegatee(com.fasterxml.jackson.databind.JsonDeserializer)"><!-- --></A><H3> 460replaceDelegatee</H3> 461<PRE> 462public <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A><?> <B>replaceDelegatee</B>(<A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A><?> delegatee)</PRE> 463<DL> 464<DD>Method that can be called to try to replace deserializer this deserializer 465 delegates calls to. If not supported (either this deserializer does not 466 delegate anything; or it does not want any changes), should either 467 throw <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang"><CODE>UnsupportedOperationException</CODE></A> (if operation does not 468 make sense or is not allowed); or return this deserializer as is. 469<P> 470<DD><DL> 471<DT><B>Since:</B></DT> 472 <DD>2.1</DD> 473</DL> 474</DD> 475</DL> 476<HR> 477 478<A NAME="getNullValue()"><!-- --></A><H3> 479getNullValue</H3> 480<PRE> 481public <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A> <B>getNullValue</B>()</PRE> 482<DL> 483<DD>Method that can be called to determine value to be used for 484 representing null values (values deserialized when JSON token 485 is <A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonToken.html?is-external=true#VALUE_NULL" title="class or interface in com.fasterxml.jackson.core"><CODE>JsonToken.VALUE_NULL</CODE></A>). Usually this is simply 486 Java null, but for some types (especially primitives) it may be 487 necessary to use non-null values. 488<p> 489 Note that deserializers are allowed to call this just once and 490 then reuse returned value; that is, method is not guaranteed to 491 be called once for each conversion. 492<p> 493 Default implementation simply returns null. 494<P> 495<DD><DL> 496</DL> 497</DD> 498</DL> 499<HR> 500 501<A NAME="getEmptyValue()"><!-- --></A><H3> 502getEmptyValue</H3> 503<PRE> 504public <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A> <B>getEmptyValue</B>()</PRE> 505<DL> 506<DD>Method called to determine value to be used for "empty" values 507 (most commonly when deserializing from empty JSON Strings). 508 Usually this is same as <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getNullValue()"><CODE>getNullValue()</CODE></A> (which in turn 509 is usually simply Java null), but it can be overridden 510 for types. Or, if type should never be converted from empty 511 String, method can also throw an exception. 512<p> 513 Default implementation simple calls <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getNullValue()"><CODE>getNullValue()</CODE></A> and 514 returns value. 515<P> 516<DD><DL> 517</DL> 518</DD> 519</DL> 520<HR> 521 522<A NAME="getKnownPropertyNames()"><!-- --></A><H3> 523getKnownPropertyNames</H3> 524<PRE> 525public <A HREF="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>> <B>getKnownPropertyNames</B>()</PRE> 526<DL> 527<DD>Method that will 528 either return null to indicate that type being deserializers 529 has no concept of properties; or a collection of identifiers 530 for which <code>toString</code> will give external property 531 name. 532 This is only to be used for error reporting and diagnostics 533 purposes (most commonly, to accompany "unknown property" 534 exception). 535<P> 536<DD><DL> 537<DT><B>Since:</B></DT> 538 <DD>2.0</DD> 539</DL> 540</DD> 541</DL> 542<HR> 543 544<A NAME="isCachable()"><!-- --></A><H3> 545isCachable</H3> 546<PRE> 547public boolean <B>isCachable</B>()</PRE> 548<DL> 549<DD>Method called to see if deserializer instance is cachable and 550 usable for other properties of same type (type for which instance 551 was created). 552<p> 553 Note that cached instances are still resolved on per-property basis, 554 if instance implements <A HREF="../../../../com/fasterxml/jackson/databind/deser/ResolvableDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><CODE>ResolvableDeserializer</CODE></A>: 555 cached instance is just as the base. This means that in most cases it is safe to 556 cache instances; however, it only makes sense to cache instances 557 if instantiation is expensive, or if instances are heavy-weight. 558<p> 559 Default implementation returns false, to indicate that no caching 560 is done. 561<P> 562<DD><DL> 563</DL> 564</DD> 565</DL> 566<HR> 567 568<A NAME="getObjectIdReader()"><!-- --></A><H3> 569getObjectIdReader</H3> 570<PRE> 571public <A HREF="../../../../com/fasterxml/jackson/databind/deser/impl/ObjectIdReader.html" title="class in com.fasterxml.jackson.databind.deser.impl">ObjectIdReader</A> <B>getObjectIdReader</B>()</PRE> 572<DL> 573<DD>Accessor that can be used to check whether this deserializer 574 is expecting to possibly get an Object Identifier value instead of full value 575 serialization, and if so, should be able to resolve it to actual 576 Object instance to return as deserialized value. 577<p> 578 Default implementation returns null, as support can not be implemented 579 generically. Some standard deserializers (most notably 580 <A HREF="../../../../com/fasterxml/jackson/databind/deser/BeanDeserializer.html" title="class in com.fasterxml.jackson.databind.deser"><CODE>BeanDeserializer</CODE></A>) 581 do implement this feature, and may return reader instance, depending on exact 582 configuration of instance (which is based on type, and referring property). 583<P> 584<DD><DL> 585 586<DT><B>Returns:</B><DD>ObjectIdReader used for resolving possible Object Identifier 587 value, instead of full value serialization, if deserializer can do that; 588 null if no Object Id is expected.<DT><B>Since:</B></DT> 589 <DD>2.0</DD> 590</DL> 591</DD> 592</DL> 593<HR> 594 595<A NAME="getDelegatee()"><!-- --></A><H3> 596getDelegatee</H3> 597<PRE> 598public <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A><?> <B>getDelegatee</B>()</PRE> 599<DL> 600<DD>Accessor that can be used to determine if this deserializer uses 601 another deserializer for actual deserialization, by delegating 602 calls. If so, will return immediate delegate (which itself may 603 delegate to further deserializers); otherwise will return null. 604<P> 605<DD><DL> 606 607<DT><B>Returns:</B><DD>Deserializer this deserializer delegates calls to, if null; 608 null otherwise.<DT><B>Since:</B></DT> 609 <DD>2.1</DD> 610</DL> 611</DD> 612</DL> 613<!-- ========= END OF CLASS DATA ========= --> 614<HR> 615 616 617<!-- ======= START OF BOTTOM NAVBAR ====== --> 618<A NAME="navbar_bottom"><!-- --></A> 619<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 620<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 621<TR> 622<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 623<A NAME="navbar_bottom_firstrow"><!-- --></A> 624<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 625 <TR ALIGN="center" VALIGN="top"> 626 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 627 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 628 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 629 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JsonDeserializer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 630 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 631 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 632 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 633 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 634 </TR> 635</TABLE> 636</TD> 637<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 638</EM> 639</TD> 640</TR> 641 642<TR> 643<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 644 <A HREF="../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind"><B>PREV CLASS</B></A> 645 <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.None.html" title="class in com.fasterxml.jackson.databind"><B>NEXT CLASS</B></A></FONT></TD> 646<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 647 <A HREF="../../../../index.html?com/fasterxml/jackson/databind/JsonDeserializer.html" target="_top"><B>FRAMES</B></A> 648 <A HREF="JsonDeserializer.html" target="_top"><B>NO FRAMES</B></A> 649 <SCRIPT type="text/javascript"> 650 <!-- 651 if(window==top) { 652 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 653 } 654 //--> 655</SCRIPT> 656<NOSCRIPT> 657 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 658</NOSCRIPT> 659 660 661</FONT></TD> 662</TR> 663<TR> 664<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 665 SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> 666<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 667DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> 668</TR> 669</TABLE> 670<A NAME="skip-navbar_bottom"></A> 671<!-- ======== END OF BOTTOM NAVBAR ======= --> 672 673<HR> 674Copyright © 2012 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved. 675</BODY> 676</HTML> 677