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_25) on Mon Jun 02 17:48:54 PDT 2014 --> 6<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> 7<title>JsonDeserializer (jackson-databind 2.4.0 API)</title> 8<meta name="date" content="2014-06-02"> 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="JsonDeserializer (jackson-databind 2.4.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="../../../../overview-summary.html">Overview</a></li> 29<li><a href="package-summary.html">Package</a></li> 30<li class="navBarCell1Rev">Class</li> 31<li><a href="class-use/JsonDeserializer.html">Use</a></li> 32<li><a href="package-tree.html">Tree</a></li> 33<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 34<li><a href="../../../../index-all.html">Index</a></li> 35<li><a href="../../../../help-doc.html">Help</a></li> 36</ul> 37</div> 38<div class="subNav"> 39<ul class="navList"> 40<li><a href="../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind"><span class="strong">Prev Class</span></a></li> 41<li><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.None.html" title="class in com.fasterxml.jackson.databind"><span class="strong">Next Class</span></a></li> 42</ul> 43<ul class="navList"> 44<li><a href="../../../../index.html?com/fasterxml/jackson/databind/JsonDeserializer.html" target="_top">Frames</a></li> 45<li><a href="JsonDeserializer.html" target="_top">No Frames</a></li> 46</ul> 47<ul class="navList" id="allclasses_navbar_top"> 48<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 49</ul> 50<div> 51<script type="text/javascript"><!-- 52 allClassesLink = document.getElementById("allclasses_navbar_top"); 53 if(window==top) { 54 allClassesLink.style.display = "block"; 55 } 56 else { 57 allClassesLink.style.display = "none"; 58 } 59 //--> 60</script> 61</div> 62<div> 63<ul class="subNavList"> 64<li>Summary: </li> 65<li><a href="#nested_class_summary">Nested</a> | </li> 66<li>Field | </li> 67<li><a href="#constructor_summary">Constr</a> | </li> 68<li><a href="#method_summary">Method</a></li> 69</ul> 70<ul class="subNavList"> 71<li>Detail: </li> 72<li>Field | </li> 73<li><a href="#constructor_detail">Constr</a> | </li> 74<li><a href="#method_detail">Method</a></li> 75</ul> 76</div> 77<a name="skip-navbar_top"> 78<!-- --> 79</a></div> 80<!-- ========= END OF TOP NAVBAR ========= --> 81<!-- ======== START OF CLASS DATA ======== --> 82<div class="header"> 83<div class="subTitle">com.fasterxml.jackson.databind</div> 84<h2 title="Class JsonDeserializer" class="title">Class JsonDeserializer<T></h2> 85</div> 86<div class="contentContainer"> 87<ul class="inheritance"> 88<li><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></li> 89<li> 90<ul class="inheritance"> 91<li>com.fasterxml.jackson.databind.JsonDeserializer<T></li> 92</ul> 93</li> 94</ul> 95<div class="description"> 96<ul class="blockList"> 97<li class="blockList"> 98<dl> 99<dt>Direct Known Subclasses:</dt> 100<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<br> 104<pre>public abstract class <span class="strong">JsonDeserializer<T></span> 105extends <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></pre> 106<div class="block">Abstract 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 107 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 108 arbitrary types from JSON, using provided <a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core"><code>JsonParser</code></a>. 109<p> 110 Custom deserializers should usually not directly extend this class, 111 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> 112 (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>). 113<p> 114 If deserializer is an aggregate one -- meaning it delegates handling of some 115 of its contents by using other deserializer(s) -- it typically also needs 116 to implement <a href="../../../../com/fasterxml/jackson/databind/deser/ResolvableDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><code>ResolvableDeserializer</code></a>, 117 which can locate dependant deserializers. This is important to allow dynamic 118 overrides of deserializers; separate call interface is needed to separate 119 resolution of dependant deserializers (which may have cyclic link back 120 to deserializer itself, directly or indirectly). 121<p> 122 In addition, to support per-property annotations (to configure aspects 123 of deserialization on per-property basis), deserializers may want 124 to implement 125 <a href="../../../../com/fasterxml/jackson/databind/deser/ContextualDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><code>ContextualDeserializer</code></a>, 126 which allows specialization of deserializers: call to 127 <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> 128 is passed information on property, and can create a newly configured 129 deserializer for handling that particular property. 130<p> 131 If both 132 <a href="../../../../com/fasterxml/jackson/databind/deser/ResolvableDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><code>ResolvableDeserializer</code></a> and 133 <a href="../../../../com/fasterxml/jackson/databind/deser/ContextualDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><code>ContextualDeserializer</code></a> 134 are implemented, resolution of deserializers occurs before 135 contextualization.</div> 136</li> 137</ul> 138</div> 139<div class="summary"> 140<ul class="blockList"> 141<li class="blockList"> 142<!-- ======== NESTED CLASS SUMMARY ======== --> 143<ul class="blockList"> 144<li class="blockList"><a name="nested_class_summary"> 145<!-- --> 146</a> 147<h3>Nested Class Summary</h3> 148<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> 149<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> 150<tr> 151<th class="colFirst" scope="col">Modifier and Type</th> 152<th class="colLast" scope="col">Class and Description</th> 153</tr> 154<tr class="altColor"> 155<td class="colFirst"><code>static class </code></td> 156<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.None.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer.None</a></strong></code> 157<div class="block">This marker class is only to be used with annotations, to 158 indicate that <b>no deserializer is configured</b>.</div> 159</td> 160</tr> 161</table> 162</li> 163</ul> 164<!-- ======== CONSTRUCTOR SUMMARY ======== --> 165<ul class="blockList"> 166<li class="blockList"><a name="constructor_summary"> 167<!-- --> 168</a> 169<h3>Constructor Summary</h3> 170<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> 171<caption><span>Constructors</span><span class="tabEnd"> </span></caption> 172<tr> 173<th class="colOne" scope="col">Constructor and Description</th> 174</tr> 175<tr class="altColor"> 176<td class="colOne"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#JsonDeserializer()">JsonDeserializer</a></strong>()</code> </td> 177</tr> 178</table> 179</li> 180</ul> 181<!-- ========== METHOD SUMMARY =========== --> 182<ul class="blockList"> 183<li class="blockList"><a name="method_summary"> 184<!-- --> 185</a> 186<h3>Method Summary</h3> 187<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 188<caption><span>Methods</span><span class="tabEnd"> </span></caption> 189<tr> 190<th class="colFirst" scope="col">Modifier and Type</th> 191<th class="colLast" scope="col">Method and Description</th> 192</tr> 193<tr class="altColor"> 194<td class="colFirst"><code>abstract <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a></code></td> 195<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">deserialize</a></strong>(<a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</a> jp, 196 <a href="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</a> ctxt)</code> 197<div class="block">Method that can be called to ask implementation to deserialize 198 JSON content into the value type this serializer handles.</div> 199</td> 200</tr> 201<tr class="rowColor"> 202<td class="colFirst"><code><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a></code></td> 203<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, T)">deserialize</a></strong>(<a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</a> jp, 204 <a href="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</a> ctxt, 205 <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a> intoValue)</code> 206<div class="block">Alternate deserialization method (compared to the most commonly 207 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>), 208 which takes in initialized value instance, to be 209 configured and/or populated by deserializer.</div> 210</td> 211</tr> 212<tr class="altColor"> 213<td class="colFirst"><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></td> 214<td class="colLast"><code><strong><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></strong>(<a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</a> jp, 215 <a href="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</a> ctxt, 216 <a href="../../../../com/fasterxml/jackson/databind/jsontype/TypeDeserializer.html" title="class in com.fasterxml.jackson.databind.jsontype">TypeDeserializer</a> typeDeserializer)</code> 217<div class="block">Deserialization called when type being deserialized is defined to 218 contain additional type identifier, to allow for correctly 219 instantiating correct subtype.</div> 220</td> 221</tr> 222<tr class="rowColor"> 223<td class="colFirst"><code><a href="../../../../com/fasterxml/jackson/databind/deser/SettableBeanProperty.html" title="class in com.fasterxml.jackson.databind.deser">SettableBeanProperty</a></code></td> 224<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#findBackReference(java.lang.String)">findBackReference</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> refName)</code> 225<div class="block">Method needed by <a href="../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.html" title="class in com.fasterxml.jackson.databind.deser"><code>BeanDeserializerFactory</code></a> to properly link 226 managed- and back-reference pairs.</div> 227</td> 228</tr> 229<tr class="altColor"> 230<td class="colFirst"><code><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</a><?></code></td> 231<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getDelegatee()">getDelegatee</a></strong>()</code> 232<div class="block">Accessor that can be used to determine if this deserializer uses 233 another deserializer for actual deserialization, by delegating 234 calls.</div> 235</td> 236</tr> 237<tr class="rowColor"> 238<td class="colFirst"><code><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a></code></td> 239<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getEmptyValue()">getEmptyValue</a></strong>()</code> 240<div class="block">Method called to determine value to be used for "empty" values 241 (most commonly when deserializing from empty JSON Strings).</div> 242</td> 243</tr> 244<tr class="altColor"> 245<td class="colFirst"><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></td> 246<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getKnownPropertyNames()">getKnownPropertyNames</a></strong>()</code> 247<div class="block">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.</div> 252</td> 253</tr> 254<tr class="rowColor"> 255<td class="colFirst"><code><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a></code></td> 256<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getNullValue()">getNullValue</a></strong>()</code> 257<div class="block">Method that can be called to determine value to be used for 258 representing null values (values deserialized when JSON token 259 is <a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/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>).</div> 260</td> 261</tr> 262<tr class="altColor"> 263<td class="colFirst"><code><a href="../../../../com/fasterxml/jackson/databind/deser/impl/ObjectIdReader.html" title="class in com.fasterxml.jackson.databind.deser.impl">ObjectIdReader</a></code></td> 264<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getObjectIdReader()">getObjectIdReader</a></strong>()</code> 265<div class="block">Accessor that can be used to check whether this deserializer 266 is expecting to possibly get an Object Identifier value instead of full value 267 serialization, and if so, should be able to resolve it to actual 268 Object instance to return as deserialized value.</div> 269</td> 270</tr> 271<tr class="rowColor"> 272<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?></code></td> 273<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#handledType()">handledType</a></strong>()</code> 274<div class="block">Method for accessing type of values this deserializer produces.</div> 275</td> 276</tr> 277<tr class="altColor"> 278<td class="colFirst"><code>boolean</code></td> 279<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#isCachable()">isCachable</a></strong>()</code> 280<div class="block">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).</div> 283</td> 284</tr> 285<tr class="rowColor"> 286<td class="colFirst"><code><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</a><?></code></td> 287<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#replaceDelegatee(com.fasterxml.jackson.databind.JsonDeserializer)">replaceDelegatee</a></strong>(<a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</a><?> delegatee)</code> 288<div class="block">Method that can be called to try to replace deserializer this deserializer 289 delegates calls to.</div> 290</td> 291</tr> 292<tr class="altColor"> 293<td class="colFirst"><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></td> 294<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#unwrappingDeserializer(com.fasterxml.jackson.databind.util.NameTransformer)">unwrappingDeserializer</a></strong>(<a href="../../../../com/fasterxml/jackson/databind/util/NameTransformer.html" title="class in com.fasterxml.jackson.databind.util">NameTransformer</a> unwrapper)</code> 295<div class="block">Method that will return deserializer instance that is able 296 to handle "unwrapped" value instances 297 If no unwrapped instance can be constructed, will simply 298 return this object as-is.</div> 299</td> 300</tr> 301</table> 302<ul class="blockList"> 303<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> 304<!-- --> 305</a> 306<h3>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></h3> 307<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></li> 308</ul> 309</li> 310</ul> 311</li> 312</ul> 313</div> 314<div class="details"> 315<ul class="blockList"> 316<li class="blockList"> 317<!-- ========= CONSTRUCTOR DETAIL ======== --> 318<ul class="blockList"> 319<li class="blockList"><a name="constructor_detail"> 320<!-- --> 321</a> 322<h3>Constructor Detail</h3> 323<a name="JsonDeserializer()"> 324<!-- --> 325</a> 326<ul class="blockListLast"> 327<li class="blockList"> 328<h4>JsonDeserializer</h4> 329<pre>public JsonDeserializer()</pre> 330</li> 331</ul> 332</li> 333</ul> 334<!-- ============ METHOD DETAIL ========== --> 335<ul class="blockList"> 336<li class="blockList"><a name="method_detail"> 337<!-- --> 338</a> 339<h3>Method Detail</h3> 340<a name="deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)"> 341<!-- --> 342</a> 343<ul class="blockList"> 344<li class="blockList"> 345<h4>deserialize</h4> 346<pre>public abstract <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a> deserialize(<a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</a> jp, 347 <a href="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</a> ctxt) 348 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>, 349 <a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</a></pre> 350<div class="block">Method that can be called to ask implementation to deserialize 351 JSON content into the value type this serializer handles. 352 Returned instance is to be constructed by method itself. 353<p> 354 Pre-condition for this method is that the parser points to the 355 first event that is part of value to deserializer (and which 356 is never JSON 'null' literal, more on this below): for simple 357 types it may be the only value; and for structured types the 358 Object start marker or a FIELD_NAME. 359 </p> 360 <p> 361 The two possible input conditions for structured types result 362 from polymorphism via fields. In the ordinary case, Jackson 363 calls this method when it has encountered an OBJECT_START, 364 and the method implementation must advance to the next token to 365 see the first field name. If the application configures 366 polymorphism via a field, then the object looks like the following. 367 <pre> 368 { 369 "@class": "class name", 370 ... 371 } 372 </pre> 373 Jackson consumes the two tokens (the <tt>@class</tt> field name 374 and its value) in order to learn the class and select the deserializer. 375 Thus, the stream is pointing to the FIELD_NAME for the first field 376 after the @class. Thus, if you want your method to work correctly 377 both with and without polymorphism, you must begin your method with: 378 <pre> 379 if (jp.getCurrentToken() == JsonToken.START_OBJECT) { 380 jp.nextToken(); 381 } 382 </pre> 383 This results in the stream pointing to the field name, so that 384 the two conditions align. 385 </p> 386 <p> 387 Post-condition is that the parser will point to the last 388 event that is part of deserialized value (or in case deserialization 389 fails, event that was not recognized or usable, which may be 390 the same event as the one it pointed to upon call). 391<p> 392 Note that this method is never called for JSON null literal, 393 and thus deserializers need (and should) not check for it.</div> 394<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jp</code> - Parsed used for reading JSON content</dd><dd><code>ctxt</code> - Context that can be used to access information about 395 this deserialization activity.</dd> 396<dt><span class="strong">Returns:</span></dt><dd>Deserialized value</dd> 397<dt><span class="strong">Throws:</span></dt> 398<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></dd> 399<dd><code><a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</a></code></dd></dl> 400</li> 401</ul> 402<a name="deserialize(com.fasterxml.jackson.core.JsonParser,com.fasterxml.jackson.databind.DeserializationContext,java.lang.Object)"> 403<!-- --> 404</a><a name="deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, T)"> 405<!-- --> 406</a> 407<ul class="blockList"> 408<li class="blockList"> 409<h4>deserialize</h4> 410<pre>public <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a> deserialize(<a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</a> jp, 411 <a href="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</a> ctxt, 412 <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a> intoValue) 413 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>, 414 <a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</a></pre> 415<div class="block">Alternate deserialization method (compared to the most commonly 416 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>), 417 which takes in initialized value instance, to be 418 configured and/or populated by deserializer. 419 Method is not necessarily used (or supported) by all types 420 (it will not work for immutable types, for obvious reasons): 421 most commonly it is used for Collections and Maps. 422 It may be used both with "updating readers" (for POJOs) and 423 when Collections and Maps use "getter as setter". 424<p> 425 Default implementation just throws 426 <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 427 that do not explicitly add support do not necessarily support 428 update-existing-value operation (esp. immutable types)</div> 429<dl><dt><span class="strong">Throws:</span></dt> 430<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></dd> 431<dd><code><a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</a></code></dd></dl> 432</li> 433</ul> 434<a name="deserializeWithType(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.jsontype.TypeDeserializer)"> 435<!-- --> 436</a> 437<ul class="blockList"> 438<li class="blockList"> 439<h4>deserializeWithType</h4> 440<pre>public <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> deserializeWithType(<a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</a> jp, 441 <a href="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</a> ctxt, 442 <a href="../../../../com/fasterxml/jackson/databind/jsontype/TypeDeserializer.html" title="class in com.fasterxml.jackson.databind.jsontype">TypeDeserializer</a> typeDeserializer) 443 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>, 444 <a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</a></pre> 445<div class="block">Deserialization called when type being deserialized is defined to 446 contain additional type identifier, to allow for correctly 447 instantiating correct subtype. This can be due to annotation on 448 type (or its supertype), or due to global settings without 449 annotations. 450<p> 451 Default implementation may work for some types, but ideally subclasses 452 should not rely on current default implementation. 453 Implementation is mostly provided to avoid compilation errors with older 454 code.</div> 455<dl><dt><span class="strong">Parameters:</span></dt><dd><code>typeDeserializer</code> - Deserializer to use for handling type information</dd> 456<dt><span class="strong">Throws:</span></dt> 457<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></dd> 458<dd><code><a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</a></code></dd></dl> 459</li> 460</ul> 461<a name="unwrappingDeserializer(com.fasterxml.jackson.databind.util.NameTransformer)"> 462<!-- --> 463</a> 464<ul class="blockList"> 465<li class="blockList"> 466<h4>unwrappingDeserializer</h4> 467<pre>public <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>> unwrappingDeserializer(<a href="../../../../com/fasterxml/jackson/databind/util/NameTransformer.html" title="class in com.fasterxml.jackson.databind.util">NameTransformer</a> unwrapper)</pre> 468<div class="block">Method that will return deserializer instance that is able 469 to handle "unwrapped" value instances 470 If no unwrapped instance can be constructed, will simply 471 return this object as-is. 472<p> 473 Default implementation just returns 'this' 474 indicating that no unwrapped variant exists</div> 475</li> 476</ul> 477<a name="replaceDelegatee(com.fasterxml.jackson.databind.JsonDeserializer)"> 478<!-- --> 479</a> 480<ul class="blockList"> 481<li class="blockList"> 482<h4>replaceDelegatee</h4> 483<pre>public <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</a><?> replaceDelegatee(<a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</a><?> delegatee)</pre> 484<div class="block">Method that can be called to try to replace deserializer this deserializer 485 delegates calls to. If not supported (either this deserializer does not 486 delegate anything; or it does not want any changes), should either 487 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 488 make sense or is not allowed); or return this deserializer as is.</div> 489<dl><dt><span class="strong">Since:</span></dt> 490 <dd>2.1</dd></dl> 491</li> 492</ul> 493<a name="handledType()"> 494<!-- --> 495</a> 496<ul class="blockList"> 497<li class="blockList"> 498<h4>handledType</h4> 499<pre>public <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> handledType()</pre> 500<div class="block">Method for accessing type of values this deserializer produces. 501 Note that this information is not guaranteed to be exact -- it 502 may be a more generic (super-type) -- but it should not be 503 incorrect (return a non-related type). 504<p> 505 Default implementation will return null, which means almost same 506 same as returning <code>Object.class</code> would; that is, that 507 nothing is known about handled type. 508<p></div> 509<dl><dt><span class="strong">Since:</span></dt> 510 <dd>2.3</dd></dl> 511</li> 512</ul> 513<a name="getNullValue()"> 514<!-- --> 515</a> 516<ul class="blockList"> 517<li class="blockList"> 518<h4>getNullValue</h4> 519<pre>public <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a> getNullValue()</pre> 520<div class="block">Method that can be called to determine value to be used for 521 representing null values (values deserialized when JSON token 522 is <a href="http://fasterxml.github.com/jackson-core/javadoc/2.4/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 523 Java null, but for some types (especially primitives) it may be 524 necessary to use non-null values. 525<p> 526 Note that deserializers are allowed to call this just once and 527 then reuse returned value; that is, method is not guaranteed to 528 be called once for each conversion. 529<p> 530 Default implementation simply returns null.</div> 531</li> 532</ul> 533<a name="getEmptyValue()"> 534<!-- --> 535</a> 536<ul class="blockList"> 537<li class="blockList"> 538<h4>getEmptyValue</h4> 539<pre>public <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a> getEmptyValue()</pre> 540<div class="block">Method called to determine value to be used for "empty" values 541 (most commonly when deserializing from empty JSON Strings). 542 Usually this is same as <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getNullValue()"><code>getNullValue()</code></a> (which in turn 543 is usually simply Java null), but it can be overridden 544 for types. Or, if type should never be converted from empty 545 String, method can also throw an exception. 546<p> 547 Default implementation simple calls <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getNullValue()"><code>getNullValue()</code></a> and 548 returns value.</div> 549</li> 550</ul> 551<a name="getKnownPropertyNames()"> 552<!-- --> 553</a> 554<ul class="blockList"> 555<li class="blockList"> 556<h4>getKnownPropertyNames</h4> 557<pre>public <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>> getKnownPropertyNames()</pre> 558<div class="block">Method that will 559 either return null to indicate that type being deserializers 560 has no concept of properties; or a collection of identifiers 561 for which <code>toString</code> will give external property 562 name. 563 This is only to be used for error reporting and diagnostics 564 purposes (most commonly, to accompany "unknown property" 565 exception).</div> 566<dl><dt><span class="strong">Since:</span></dt> 567 <dd>2.0</dd></dl> 568</li> 569</ul> 570<a name="isCachable()"> 571<!-- --> 572</a> 573<ul class="blockList"> 574<li class="blockList"> 575<h4>isCachable</h4> 576<pre>public boolean isCachable()</pre> 577<div class="block">Method called to see if deserializer instance is cachable and 578 usable for other properties of same type (type for which instance 579 was created). 580<p> 581 Note that cached instances are still resolved on per-property basis, 582 if instance implements <a href="../../../../com/fasterxml/jackson/databind/deser/ResolvableDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><code>ResolvableDeserializer</code></a>: 583 cached instance is just as the base. This means that in most cases it is safe to 584 cache instances; however, it only makes sense to cache instances 585 if instantiation is expensive, or if instances are heavy-weight. 586<p> 587 Default implementation returns false, to indicate that no caching 588 is done.</div> 589</li> 590</ul> 591<a name="getObjectIdReader()"> 592<!-- --> 593</a> 594<ul class="blockList"> 595<li class="blockList"> 596<h4>getObjectIdReader</h4> 597<pre>public <a href="../../../../com/fasterxml/jackson/databind/deser/impl/ObjectIdReader.html" title="class in com.fasterxml.jackson.databind.deser.impl">ObjectIdReader</a> getObjectIdReader()</pre> 598<div class="block">Accessor that can be used to check whether this deserializer 599 is expecting to possibly get an Object Identifier value instead of full value 600 serialization, and if so, should be able to resolve it to actual 601 Object instance to return as deserialized value. 602<p> 603 Default implementation returns null, as support can not be implemented 604 generically. Some standard deserializers (most notably 605 <a href="../../../../com/fasterxml/jackson/databind/deser/BeanDeserializer.html" title="class in com.fasterxml.jackson.databind.deser"><code>BeanDeserializer</code></a>) 606 do implement this feature, and may return reader instance, depending on exact 607 configuration of instance (which is based on type, and referring property).</div> 608<dl><dt><span class="strong">Returns:</span></dt><dd>ObjectIdReader used for resolving possible Object Identifier 609 value, instead of full value serialization, if deserializer can do that; 610 null if no Object Id is expected.</dd><dt><span class="strong">Since:</span></dt> 611 <dd>2.0</dd></dl> 612</li> 613</ul> 614<a name="getDelegatee()"> 615<!-- --> 616</a> 617<ul class="blockList"> 618<li class="blockList"> 619<h4>getDelegatee</h4> 620<pre>public <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</a><?> getDelegatee()</pre> 621<div class="block">Accessor that can be used to determine if this deserializer uses 622 another deserializer for actual deserialization, by delegating 623 calls. If so, will return immediate delegate (which itself may 624 delegate to further deserializers); otherwise will return null.</div> 625<dl><dt><span class="strong">Returns:</span></dt><dd>Deserializer this deserializer delegates calls to, if null; 626 null otherwise.</dd><dt><span class="strong">Since:</span></dt> 627 <dd>2.1</dd></dl> 628</li> 629</ul> 630<a name="findBackReference(java.lang.String)"> 631<!-- --> 632</a> 633<ul class="blockListLast"> 634<li class="blockList"> 635<h4>findBackReference</h4> 636<pre>public <a href="../../../../com/fasterxml/jackson/databind/deser/SettableBeanProperty.html" title="class in com.fasterxml.jackson.databind.deser">SettableBeanProperty</a> findBackReference(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> refName)</pre> 637<div class="block">Method needed by <a href="../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.html" title="class in com.fasterxml.jackson.databind.deser"><code>BeanDeserializerFactory</code></a> to properly link 638 managed- and back-reference pairs.</div> 639<dl><dt><span class="strong">Since:</span></dt> 640 <dd>2.2 (was moved out of <code>BeanDeserializerBase</code>)</dd></dl> 641</li> 642</ul> 643</li> 644</ul> 645</li> 646</ul> 647</div> 648</div> 649<!-- ========= END OF CLASS DATA ========= --> 650<!-- ======= START OF BOTTOM NAVBAR ====== --> 651<div class="bottomNav"><a name="navbar_bottom"> 652<!-- --> 653</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 654<!-- --> 655</a> 656<ul class="navList" title="Navigation"> 657<li><a href="../../../../overview-summary.html">Overview</a></li> 658<li><a href="package-summary.html">Package</a></li> 659<li class="navBarCell1Rev">Class</li> 660<li><a href="class-use/JsonDeserializer.html">Use</a></li> 661<li><a href="package-tree.html">Tree</a></li> 662<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 663<li><a href="../../../../index-all.html">Index</a></li> 664<li><a href="../../../../help-doc.html">Help</a></li> 665</ul> 666</div> 667<div class="subNav"> 668<ul class="navList"> 669<li><a href="../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind"><span class="strong">Prev Class</span></a></li> 670<li><a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.None.html" title="class in com.fasterxml.jackson.databind"><span class="strong">Next Class</span></a></li> 671</ul> 672<ul class="navList"> 673<li><a href="../../../../index.html?com/fasterxml/jackson/databind/JsonDeserializer.html" target="_top">Frames</a></li> 674<li><a href="JsonDeserializer.html" target="_top">No Frames</a></li> 675</ul> 676<ul class="navList" id="allclasses_navbar_bottom"> 677<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 678</ul> 679<div> 680<script type="text/javascript"><!-- 681 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 682 if(window==top) { 683 allClassesLink.style.display = "block"; 684 } 685 else { 686 allClassesLink.style.display = "none"; 687 } 688 //--> 689</script> 690</div> 691<div> 692<ul class="subNavList"> 693<li>Summary: </li> 694<li><a href="#nested_class_summary">Nested</a> | </li> 695<li>Field | </li> 696<li><a href="#constructor_summary">Constr</a> | </li> 697<li><a href="#method_summary">Method</a></li> 698</ul> 699<ul class="subNavList"> 700<li>Detail: </li> 701<li>Field | </li> 702<li><a href="#constructor_detail">Constr</a> | </li> 703<li><a href="#method_detail">Method</a></li> 704</ul> 705</div> 706<a name="skip-navbar_bottom"> 707<!-- --> 708</a></div> 709<!-- ======== END OF BOTTOM NAVBAR ======= --> 710<p class="legalCopy"><small>Copyright © 2014 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p> 711</body> 712</html> 713