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 Sat Nov 16 21:43:16 PST 2013 --> 6<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> 7<title>JsonDeserializer (jackson-databind 2.3.0 API)</title> 8<meta name="date" content="2013-11-16"> 9<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> 10</head> 11<body> 12<script type="text/javascript"><!-- 13 if (location.href.indexOf('is-external=true') == -1) { 14 parent.document.title="JsonDeserializer (jackson-databind 2.3.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.3.0/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.3.0/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.3.0/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.3.0/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.3.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>).</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.3.0/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.3.0/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. 359 Post-condition is that the parser will point to the last 360 event that is part of deserialized value (or in case deserialization 361 fails, event that was not recognized or usable, which may be 362 the same event as the one it pointed to upon call). 363<p> 364 Note that this method is never called for JSON null literal, 365 and thus deserializers need (and should) not check for it.</div> 366<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 367 this deserialization activity.</dd> 368<dt><span class="strong">Returns:</span></dt><dd>Deserialized value</dd> 369<dt><span class="strong">Throws:</span></dt> 370<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> 371<dd><code><a href="http://fasterxml.github.com/jackson-core/javadoc/2.3.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</a></code></dd></dl> 372</li> 373</ul> 374<a name="deserialize(com.fasterxml.jackson.core.JsonParser,com.fasterxml.jackson.databind.DeserializationContext,java.lang.Object)"> 375<!-- --> 376</a><a name="deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, T)"> 377<!-- --> 378</a> 379<ul class="blockList"> 380<li class="blockList"> 381<h4>deserialize</h4> 382<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.3.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</a> jp, 383 <a href="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</a> ctxt, 384 <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a> intoValue) 385 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>, 386 <a href="http://fasterxml.github.com/jackson-core/javadoc/2.3.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</a></pre> 387<div class="block">Alternate deserialization method (compared to the most commonly 388 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>), 389 which takes in initialized value instance, to be 390 configured and/or populated by deserializer. 391 Method is not necessarily used (or supported) by all types 392 (it will not work for immutable types, for obvious reasons): 393 most commonly it is used for Collections and Maps. 394 It may be used both with "updating readers" (for POJOs) and 395 when Collections and Maps use "getter as setter". 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)</div> 401<dl><dt><span class="strong">Throws:</span></dt> 402<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> 403<dd><code><a href="http://fasterxml.github.com/jackson-core/javadoc/2.3.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</a></code></dd></dl> 404</li> 405</ul> 406<a name="deserializeWithType(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.jsontype.TypeDeserializer)"> 407<!-- --> 408</a> 409<ul class="blockList"> 410<li class="blockList"> 411<h4>deserializeWithType</h4> 412<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.3.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</a> jp, 413 <a href="../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</a> ctxt, 414 <a href="../../../../com/fasterxml/jackson/databind/jsontype/TypeDeserializer.html" title="class in com.fasterxml.jackson.databind.jsontype">TypeDeserializer</a> typeDeserializer) 415 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>, 416 <a href="http://fasterxml.github.com/jackson-core/javadoc/2.3.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</a></pre> 417<div class="block">Deserialization called when type being deserialized is defined to 418 contain additional type identifier, to allow for correctly 419 instantiating correct subtype. This can be due to annotation on 420 type (or its supertype), or due to global settings without 421 annotations. 422<p> 423 Default implementation may work for some types, but ideally subclasses 424 should not rely on current default implementation. 425 Implementation is mostly provided to avoid compilation errors with older 426 code.</div> 427<dl><dt><span class="strong">Parameters:</span></dt><dd><code>typeDeserializer</code> - Deserializer to use for handling type information</dd> 428<dt><span class="strong">Throws:</span></dt> 429<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> 430<dd><code><a href="http://fasterxml.github.com/jackson-core/javadoc/2.3.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</a></code></dd></dl> 431</li> 432</ul> 433<a name="unwrappingDeserializer(com.fasterxml.jackson.databind.util.NameTransformer)"> 434<!-- --> 435</a> 436<ul class="blockList"> 437<li class="blockList"> 438<h4>unwrappingDeserializer</h4> 439<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> 440<div class="block">Method that will return deserializer instance that is able 441 to handle "unwrapped" value instances 442 If no unwrapped instance can be constructed, will simply 443 return this object as-is. 444<p> 445 Default implementation just returns 'this' 446 indicating that no unwrapped variant exists</div> 447</li> 448</ul> 449<a name="replaceDelegatee(com.fasterxml.jackson.databind.JsonDeserializer)"> 450<!-- --> 451</a> 452<ul class="blockList"> 453<li class="blockList"> 454<h4>replaceDelegatee</h4> 455<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> 456<div class="block">Method that can be called to try to replace deserializer this deserializer 457 delegates calls to. If not supported (either this deserializer does not 458 delegate anything; or it does not want any changes), should either 459 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 460 make sense or is not allowed); or return this deserializer as is.</div> 461<dl><dt><span class="strong">Since:</span></dt> 462 <dd>2.1</dd></dl> 463</li> 464</ul> 465<a name="handledType()"> 466<!-- --> 467</a> 468<ul class="blockList"> 469<li class="blockList"> 470<h4>handledType</h4> 471<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> 472<div class="block">Method for accessing type of values this deserializer produces. 473 Note that this information is not guaranteed to be exact -- it 474 may be a more generic (super-type) -- but it should not be 475 incorrect (return a non-related type). 476<p> 477 Default implementation will return null, which means almost same 478 same as returning <code>Object.class</code> would; that is, that 479 nothing is known about handled type. 480<p></div> 481<dl><dt><span class="strong">Since:</span></dt> 482 <dd>2.3</dd></dl> 483</li> 484</ul> 485<a name="getNullValue()"> 486<!-- --> 487</a> 488<ul class="blockList"> 489<li class="blockList"> 490<h4>getNullValue</h4> 491<pre>public <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a> getNullValue()</pre> 492<div class="block">Method that can be called to determine value to be used for 493 representing null values (values deserialized when JSON token 494 is <a href="http://fasterxml.github.com/jackson-core/javadoc/2.3.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 495 Java null, but for some types (especially primitives) it may be 496 necessary to use non-null values. 497<p> 498 Note that deserializers are allowed to call this just once and 499 then reuse returned value; that is, method is not guaranteed to 500 be called once for each conversion. 501<p> 502 Default implementation simply returns null.</div> 503</li> 504</ul> 505<a name="getEmptyValue()"> 506<!-- --> 507</a> 508<ul class="blockList"> 509<li class="blockList"> 510<h4>getEmptyValue</h4> 511<pre>public <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="type parameter in JsonDeserializer">T</a> getEmptyValue()</pre> 512<div class="block">Method called to determine value to be used for "empty" values 513 (most commonly when deserializing from empty JSON Strings). 514 Usually this is same as <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getNullValue()"><code>getNullValue()</code></a> (which in turn 515 is usually simply Java null), but it can be overridden 516 for types. Or, if type should never be converted from empty 517 String, method can also throw an exception. 518<p> 519 Default implementation simple calls <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getNullValue()"><code>getNullValue()</code></a> and 520 returns value.</div> 521</li> 522</ul> 523<a name="getKnownPropertyNames()"> 524<!-- --> 525</a> 526<ul class="blockList"> 527<li class="blockList"> 528<h4>getKnownPropertyNames</h4> 529<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> 530<div class="block">Method that will 531 either return null to indicate that type being deserializers 532 has no concept of properties; or a collection of identifiers 533 for which <code>toString</code> will give external property 534 name. 535 This is only to be used for error reporting and diagnostics 536 purposes (most commonly, to accompany "unknown property" 537 exception).</div> 538<dl><dt><span class="strong">Since:</span></dt> 539 <dd>2.0</dd></dl> 540</li> 541</ul> 542<a name="isCachable()"> 543<!-- --> 544</a> 545<ul class="blockList"> 546<li class="blockList"> 547<h4>isCachable</h4> 548<pre>public boolean isCachable()</pre> 549<div class="block">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.</div> 561</li> 562</ul> 563<a name="getObjectIdReader()"> 564<!-- --> 565</a> 566<ul class="blockList"> 567<li class="blockList"> 568<h4>getObjectIdReader</h4> 569<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> 570<div class="block">Accessor that can be used to check whether this deserializer 571 is expecting to possibly get an Object Identifier value instead of full value 572 serialization, and if so, should be able to resolve it to actual 573 Object instance to return as deserialized value. 574<p> 575 Default implementation returns null, as support can not be implemented 576 generically. Some standard deserializers (most notably 577 <a href="../../../../com/fasterxml/jackson/databind/deser/BeanDeserializer.html" title="class in com.fasterxml.jackson.databind.deser"><code>BeanDeserializer</code></a>) 578 do implement this feature, and may return reader instance, depending on exact 579 configuration of instance (which is based on type, and referring property).</div> 580<dl><dt><span class="strong">Returns:</span></dt><dd>ObjectIdReader used for resolving possible Object Identifier 581 value, instead of full value serialization, if deserializer can do that; 582 null if no Object Id is expected.</dd><dt><span class="strong">Since:</span></dt> 583 <dd>2.0</dd></dl> 584</li> 585</ul> 586<a name="getDelegatee()"> 587<!-- --> 588</a> 589<ul class="blockList"> 590<li class="blockList"> 591<h4>getDelegatee</h4> 592<pre>public <a href="../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</a><?> getDelegatee()</pre> 593<div class="block">Accessor that can be used to determine if this deserializer uses 594 another deserializer for actual deserialization, by delegating 595 calls. If so, will return immediate delegate (which itself may 596 delegate to further deserializers); otherwise will return null.</div> 597<dl><dt><span class="strong">Returns:</span></dt><dd>Deserializer this deserializer delegates calls to, if null; 598 null otherwise.</dd><dt><span class="strong">Since:</span></dt> 599 <dd>2.1</dd></dl> 600</li> 601</ul> 602<a name="findBackReference(java.lang.String)"> 603<!-- --> 604</a> 605<ul class="blockListLast"> 606<li class="blockList"> 607<h4>findBackReference</h4> 608<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> 609<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 610 managed- and back-reference pairs.</div> 611<dl><dt><span class="strong">Since:</span></dt> 612 <dd>2.2 (was moved out of <code>BeanDeserializerBase</code>)</dd></dl> 613</li> 614</ul> 615</li> 616</ul> 617</li> 618</ul> 619</div> 620</div> 621<!-- ========= END OF CLASS DATA ========= --> 622<!-- ======= START OF BOTTOM NAVBAR ====== --> 623<div class="bottomNav"><a name="navbar_bottom"> 624<!-- --> 625</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 626<!-- --> 627</a> 628<ul class="navList" title="Navigation"> 629<li><a href="../../../../overview-summary.html">Overview</a></li> 630<li><a href="package-summary.html">Package</a></li> 631<li class="navBarCell1Rev">Class</li> 632<li><a href="class-use/JsonDeserializer.html">Use</a></li> 633<li><a href="package-tree.html">Tree</a></li> 634<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 635<li><a href="../../../../index-all.html">Index</a></li> 636<li><a href="../../../../help-doc.html">Help</a></li> 637</ul> 638</div> 639<div class="subNav"> 640<ul class="navList"> 641<li><a href="../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind"><span class="strong">Prev Class</span></a></li> 642<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> 643</ul> 644<ul class="navList"> 645<li><a href="../../../../index.html?com/fasterxml/jackson/databind/JsonDeserializer.html" target="_top">Frames</a></li> 646<li><a href="JsonDeserializer.html" target="_top">No Frames</a></li> 647</ul> 648<ul class="navList" id="allclasses_navbar_bottom"> 649<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 650</ul> 651<div> 652<script type="text/javascript"><!-- 653 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 654 if(window==top) { 655 allClassesLink.style.display = "block"; 656 } 657 else { 658 allClassesLink.style.display = "none"; 659 } 660 //--> 661</script> 662</div> 663<div> 664<ul class="subNavList"> 665<li>Summary: </li> 666<li><a href="#nested_class_summary">Nested</a> | </li> 667<li>Field | </li> 668<li><a href="#constructor_summary">Constr</a> | </li> 669<li><a href="#method_summary">Method</a></li> 670</ul> 671<ul class="subNavList"> 672<li>Detail: </li> 673<li>Field | </li> 674<li><a href="#constructor_detail">Constr</a> | </li> 675<li><a href="#method_detail">Method</a></li> 676</ul> 677</div> 678<a name="skip-navbar_bottom"> 679<!-- --> 680</a></div> 681<!-- ======== END OF BOTTOM NAVBAR ======= --> 682<p class="legalCopy"><small>Copyright © 2012-2013 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p> 683</body> 684</html> 685