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_29) on Mon Mar 26 19:07:10 PDT 2012 --> 6<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<TITLE> 8JsonDeserializer (jackson-databind 2.0.0 API) 9</TITLE> 10 11<META NAME="date" CONTENT="2012-03-26"> 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.0.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 <CODE>JsonParser</CODE>. 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>(com.fasterxml.jackson.core.JsonParser 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>(com.fasterxml.jackson.core.JsonParser 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>(com.fasterxml.jackson.core.JsonParser 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="type parameter in JsonDeserializer">T</A></CODE></FONT></TD> 225<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getEmptyValue()">getEmptyValue</A></B>()</CODE> 226 227<BR> 228 Method called to determine value to be used for "empty" values 229 (most commonly when deserializing from empty JSON Strings).</TD> 230</TR> 231<TR BGCOLOR="white" CLASS="TableRowColor"> 232<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 233<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> 234<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getKnownPropertyNames()">getKnownPropertyNames</A></B>()</CODE> 235 236<BR> 237 Method that will 238 either return null to indicate that type being deserializers 239 has no concept of properties; or a collection of identifiers 240 for which <code>toString</code> will give external property 241 name.</TD> 242</TR> 243<TR BGCOLOR="white" CLASS="TableRowColor"> 244<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 245<CODE> <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A></CODE></FONT></TD> 246<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getNullValue()">getNullValue</A></B>()</CODE> 247 248<BR> 249 Method that can be called to determine value to be used for 250 representing null values (values deserialized when JSON token 251 is <CODE>JsonToken.VALUE_NULL</CODE>).</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/deser/impl/ObjectIdReader.html" title="class in com.fasterxml.jackson.databind.deser.impl">ObjectIdReader</A></CODE></FONT></TD> 256<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getObjectIdReader()">getObjectIdReader</A></B>()</CODE> 257 258<BR> 259 Accessor that can be used to check whether this deserializer 260 is expecting to possibly get an Object Identifier value instead of full value 261 serialization, and if so, should be able to resolve it to actual 262 Object instance to return as deserialized value.</TD> 263</TR> 264<TR BGCOLOR="white" CLASS="TableRowColor"> 265<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 266<CODE> boolean</CODE></FONT></TD> 267<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#isCachable()">isCachable</A></B>()</CODE> 268 269<BR> 270 Method called to see if deserializer instance is cachable and 271 usable for other properties of same type (type for which instance 272 was created).</TD> 273</TR> 274<TR BGCOLOR="white" CLASS="TableRowColor"> 275<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 276<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> 277<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> 278 279<BR> 280 Method that will return deserializer instance that is able 281 to handle "unwrapped" value instances 282 If no unwrapped instance can be constructed, will simply 283 return this object as-is.</TD> 284</TR> 285</TABLE> 286 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> 287<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 288<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> 289<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> 290</TR> 291<TR BGCOLOR="white" CLASS="TableRowColor"> 292<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> 293</TR> 294</TABLE> 295 296<P> 297 298<!-- ========= CONSTRUCTOR DETAIL ======== --> 299 300<A NAME="constructor_detail"><!-- --></A> 301<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 302<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 303<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 304<B>Constructor Detail</B></FONT></TH> 305</TR> 306</TABLE> 307 308<A NAME="JsonDeserializer()"><!-- --></A><H3> 309JsonDeserializer</H3> 310<PRE> 311public <B>JsonDeserializer</B>()</PRE> 312<DL> 313</DL> 314 315<!-- ============ METHOD DETAIL ========== --> 316 317<A NAME="method_detail"><!-- --></A> 318<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 319<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 320<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 321<B>Method Detail</B></FONT></TH> 322</TR> 323</TABLE> 324 325<A NAME="deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)"><!-- --></A><H3> 326deserialize</H3> 327<PRE> 328public abstract <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A> <B>deserialize</B>(com.fasterxml.jackson.core.JsonParser jp, 329 <A HREF="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt) 330 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>, 331 com.fasterxml.jackson.core.JsonProcessingException</PRE> 332<DL> 333<DD>Method that can be called to ask implementation to deserialize 334 JSON content into the value type this serializer handles. 335 Returned instance is to be constructed by method itself. 336<p> 337 Pre-condition for this method is that the parser points to the 338 first event that is part of value to deserializer (and which 339 is never JSON 'null' literal, more on this below): for simple 340 types it may be the only value; and for structured types the 341 Object start marker. 342 Post-condition is that the parser will point to the last 343 event that is part of deserialized value (or in case deserialization 344 fails, event that was not recognized or usable, which may be 345 the same event as the one it pointed to upon call). 346<p> 347 Note that this method is never called for JSON null literal, 348 and thus deserializers need (and should) not check for it. 349<P> 350<DD><DL> 351<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 352 this deserialization activity. 353<DT><B>Returns:</B><DD>Deserializer value 354<DT><B>Throws:</B> 355<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> 356<DD><CODE>com.fasterxml.jackson.core.JsonProcessingException</CODE></DL> 357</DD> 358</DL> 359<HR> 360 361<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> 362deserialize</H3> 363<PRE> 364public <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A> <B>deserialize</B>(com.fasterxml.jackson.core.JsonParser jp, 365 <A HREF="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt, 366 <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A> intoValue) 367 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>, 368 com.fasterxml.jackson.core.JsonProcessingException</PRE> 369<DL> 370<DD>Alternate deserialization method (compared to the most commonly 371 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>), 372 which takes in initialized value instance, to be 373 configured and/or populated by deserializer. 374 Method is not necessarily used for all supported types; most commonly 375 it is used 376 for Collections and Maps. 377<p> 378 Default implementation just throws 379 <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 380 that do not explicitly add support do not necessarily support 381 update-existing-value operation (esp. immutable types) 382<P> 383<DD><DL> 384 385<DT><B>Throws:</B> 386<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> 387<DD><CODE>com.fasterxml.jackson.core.JsonProcessingException</CODE></DL> 388</DD> 389</DL> 390<HR> 391 392<A NAME="deserializeWithType(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.jsontype.TypeDeserializer)"><!-- --></A><H3> 393deserializeWithType</H3> 394<PRE> 395public <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>(com.fasterxml.jackson.core.JsonParser jp, 396 <A HREF="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt, 397 <A HREF="../../../../com/fasterxml/jackson/databind/jsontype/TypeDeserializer.html" title="class in com.fasterxml.jackson.databind.jsontype">TypeDeserializer</A> typeDeserializer) 398 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>, 399 com.fasterxml.jackson.core.JsonProcessingException</PRE> 400<DL> 401<DD>Deserialization called when type being deserialized is defined to 402 contain additional type identifier, to allow for correctly 403 instantiating correct subtype. This can be due to annotation on 404 type (or its supertype), or due to global settings without 405 annotations. 406<p> 407 Default implementation may work for some types, but ideally subclasses 408 should not rely on current default implementation. 409 Implementation is mostly provided to avoid compilation errors with older 410 code. 411<P> 412<DD><DL> 413<DT><B>Parameters:</B><DD><CODE>typeDeserializer</CODE> - Deserializer to use for handling type information 414<DT><B>Throws:</B> 415<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> 416<DD><CODE>com.fasterxml.jackson.core.JsonProcessingException</CODE></DL> 417</DD> 418</DL> 419<HR> 420 421<A NAME="unwrappingDeserializer(com.fasterxml.jackson.databind.util.NameTransformer)"><!-- --></A><H3> 422unwrappingDeserializer</H3> 423<PRE> 424public <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> 425<DL> 426<DD>Method that will return deserializer instance that is able 427 to handle "unwrapped" value instances 428 If no unwrapped instance can be constructed, will simply 429 return this object as-is. 430<p> 431 Default implementation just returns 'this' 432 indicating that no unwrapped variant exists 433<P> 434<DD><DL> 435</DL> 436</DD> 437</DL> 438<HR> 439 440<A NAME="getNullValue()"><!-- --></A><H3> 441getNullValue</H3> 442<PRE> 443public <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A> <B>getNullValue</B>()</PRE> 444<DL> 445<DD>Method that can be called to determine value to be used for 446 representing null values (values deserialized when JSON token 447 is <CODE>JsonToken.VALUE_NULL</CODE>). Usually this is simply 448 Java null, but for some types (especially primitives) it may be 449 necessary to use non-null values. 450<p> 451 Note that deserializers are allowed to call this just once and 452 then reuse returned value; that is, method is not guaranteed to 453 be called once for each conversion. 454<p> 455 Default implementation simply returns null. 456<P> 457<DD><DL> 458</DL> 459</DD> 460</DL> 461<HR> 462 463<A NAME="getEmptyValue()"><!-- --></A><H3> 464getEmptyValue</H3> 465<PRE> 466public <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</A> <B>getEmptyValue</B>()</PRE> 467<DL> 468<DD>Method called to determine value to be used for "empty" values 469 (most commonly when deserializing from empty JSON Strings). 470 Usually this is same as <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getNullValue()"><CODE>getNullValue()</CODE></A> (which in turn 471 is usually simply Java null), but it can be overridden 472 for types. Or, if type should never be converted from empty 473 String, method can also throw an exception. 474<p> 475 Default implementation simple calls <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getNullValue()"><CODE>getNullValue()</CODE></A> and 476 returns value. 477<P> 478<DD><DL> 479</DL> 480</DD> 481</DL> 482<HR> 483 484<A NAME="getKnownPropertyNames()"><!-- --></A><H3> 485getKnownPropertyNames</H3> 486<PRE> 487public <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> 488<DL> 489<DD>Method that will 490 either return null to indicate that type being deserializers 491 has no concept of properties; or a collection of identifiers 492 for which <code>toString</code> will give external property 493 name. 494 This is only to be used for error reporting and diagnostics 495 purposes (most commonly, to accompany "unknown property" 496 exception). 497<P> 498<DD><DL> 499<DT><B>Since:</B></DT> 500 <DD>2.0</DD> 501</DL> 502</DD> 503</DL> 504<HR> 505 506<A NAME="isCachable()"><!-- --></A><H3> 507isCachable</H3> 508<PRE> 509public boolean <B>isCachable</B>()</PRE> 510<DL> 511<DD>Method called to see if deserializer instance is cachable and 512 usable for other properties of same type (type for which instance 513 was created). 514<p> 515 Note that cached instances are still resolved on per-property basis, 516 if instance implements <A HREF="../../../../com/fasterxml/jackson/databind/deser/ResolvableDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><CODE>ResolvableDeserializer</CODE></A>: 517 cached instance is just as the base. This means that in most cases it is safe to 518 cache instances; however, it only makes sense to cache instances 519 if instantiation is expensive, or if instances are heavy-weight. 520<p> 521 Default implementation returns false, to indicate that no caching 522 is done. 523<P> 524<DD><DL> 525</DL> 526</DD> 527</DL> 528<HR> 529 530<A NAME="getObjectIdReader()"><!-- --></A><H3> 531getObjectIdReader</H3> 532<PRE> 533public <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> 534<DL> 535<DD>Accessor that can be used to check whether this deserializer 536 is expecting to possibly get an Object Identifier value instead of full value 537 serialization, and if so, should be able to resolve it to actual 538 Object instance to return as deserialized value. 539<p> 540 Default implementation returns null, as support can not be implemented 541 generically. Some standard deserializers (most notably 542 <A HREF="../../../../com/fasterxml/jackson/databind/deser/BeanDeserializer.html" title="class in com.fasterxml.jackson.databind.deser"><CODE>BeanDeserializer</CODE></A>) 543 do implement this feature, and may return reader instance, depending on exact 544 configuration of instance (which is based on type, and referring property). 545<P> 546<DD><DL> 547 548<DT><B>Returns:</B><DD>ObjectIdReader used for resolving possible Object Identifier 549 value, instead of full value serialization, if deserializer can do that; 550 null if no Object Id is expected.<DT><B>Since:</B></DT> 551 <DD>2.0</DD> 552</DL> 553</DD> 554</DL> 555<!-- ========= END OF CLASS DATA ========= --> 556<HR> 557 558 559<!-- ======= START OF BOTTOM NAVBAR ====== --> 560<A NAME="navbar_bottom"><!-- --></A> 561<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 562<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 563<TR> 564<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 565<A NAME="navbar_bottom_firstrow"><!-- --></A> 566<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 567 <TR ALIGN="center" VALIGN="top"> 568 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 569 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 570 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 571 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JsonDeserializer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 572 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 573 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 574 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 575 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 576 </TR> 577</TABLE> 578</TD> 579<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 580</EM> 581</TD> 582</TR> 583 584<TR> 585<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 586 <A HREF="../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind"><B>PREV CLASS</B></A> 587 <A HREF="../../../../com/fasterxml/jackson/databind/JsonDeserializer.None.html" title="class in com.fasterxml.jackson.databind"><B>NEXT CLASS</B></A></FONT></TD> 588<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 589 <A HREF="../../../../index.html?com/fasterxml/jackson/databind/JsonDeserializer.html" target="_top"><B>FRAMES</B></A> 590 <A HREF="JsonDeserializer.html" target="_top"><B>NO FRAMES</B></A> 591 <SCRIPT type="text/javascript"> 592 <!-- 593 if(window==top) { 594 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 595 } 596 //--> 597</SCRIPT> 598<NOSCRIPT> 599 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 600</NOSCRIPT> 601 602 603</FONT></TD> 604</TR> 605<TR> 606<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 607 SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> 608<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 609DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> 610</TR> 611</TABLE> 612<A NAME="skip-navbar_bottom"></A> 613<!-- ======== END OF BOTTOM NAVBAR ======= --> 614 615<HR> 616Copyright © 2012 <a href="http://fasterxml.com">fasterxml.com</a>. All Rights Reserved. 617</BODY> 618</HTML> 619