• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 Thu Jan 01 17:43:56 PST 2015 -->
6<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
7<title>DeserializationProblemHandler (jackson-databind 2.5.0 API)</title>
8<meta name="date" content="2015-01-01">
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="DeserializationProblemHandler (jackson-databind 2.5.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/DeserializationProblemHandler.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/deser/DefaultDeserializationContext.Impl.html" title="class in com.fasterxml.jackson.databind.deser"><span class="strong">Prev Class</span></a></li>
41<li><a href="../../../../../com/fasterxml/jackson/databind/deser/DeserializerCache.html" title="class in com.fasterxml.jackson.databind.deser"><span class="strong">Next Class</span></a></li>
42</ul>
43<ul class="navList">
44<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.html" target="_top">Frames</a></li>
45<li><a href="DeserializationProblemHandler.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:&nbsp;</li>
65<li>Nested&nbsp;|&nbsp;</li>
66<li>Field&nbsp;|&nbsp;</li>
67<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
68<li><a href="#method_summary">Method</a></li>
69</ul>
70<ul class="subNavList">
71<li>Detail:&nbsp;</li>
72<li>Field&nbsp;|&nbsp;</li>
73<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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.deser</div>
84<h2 title="Class DeserializationProblemHandler" class="title">Class DeserializationProblemHandler</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.deser.DeserializationProblemHandler</li>
92</ul>
93</li>
94</ul>
95<div class="description">
96<ul class="blockList">
97<li class="blockList">
98<hr>
99<br>
100<pre>public abstract class <span class="strong">DeserializationProblemHandler</span>
101extends <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>
102<div class="block">This is the class that can be registered (via
103 <a href="../../../../../com/fasterxml/jackson/databind/DeserializationConfig.html" title="class in com.fasterxml.jackson.databind"><code>DeserializationConfig</code></a> object owner by
104 <a href="../../../../../com/fasterxml/jackson/databind/ObjectMapper.html" title="class in com.fasterxml.jackson.databind"><code>ObjectMapper</code></a>) to get calledn when a potentially
105 recoverable problem is encountered during deserialization
106 process. Handlers can try to resolve the problem, throw
107 an exception or do nothing.
108<p>
109 Default implementations for all methods implemented minimal
110 "do nothing" functionality, which is roughly equivalent to
111 not having a registered listener at all. This allows for
112 only implemented handler methods one is interested in, without
113 handling other cases.</div>
114</li>
115</ul>
116</div>
117<div class="summary">
118<ul class="blockList">
119<li class="blockList">
120<!-- ======== CONSTRUCTOR SUMMARY ======== -->
121<ul class="blockList">
122<li class="blockList"><a name="constructor_summary">
123<!--   -->
124</a>
125<h3>Constructor Summary</h3>
126<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
127<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
128<tr>
129<th class="colOne" scope="col">Constructor and Description</th>
130</tr>
131<tr class="altColor">
132<td class="colOne"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.html#DeserializationProblemHandler()">DeserializationProblemHandler</a></strong>()</code>&nbsp;</td>
133</tr>
134</table>
135</li>
136</ul>
137<!-- ========== METHOD SUMMARY =========== -->
138<ul class="blockList">
139<li class="blockList"><a name="method_summary">
140<!--   -->
141</a>
142<h3>Method Summary</h3>
143<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
144<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
145<tr>
146<th class="colFirst" scope="col">Modifier and Type</th>
147<th class="colLast" scope="col">Method and Description</th>
148</tr>
149<tr class="altColor">
150<td class="colFirst"><code>boolean</code></td>
151<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.html#handleUnknownProperty(com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.JsonDeserializer, java.lang.Object, java.lang.String)">handleUnknownProperty</a></strong>(<a href="../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</a>&nbsp;ctxt,
152                     com.fasterxml.jackson.core.JsonParser&nbsp;jp,
153                     <a href="../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</a>&lt;?&gt;&nbsp;deserializer,
154                     <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>&nbsp;beanOrClass,
155                     <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>&nbsp;propertyName)</code>
156<div class="block">Method called when a JSON Map ("Object") entry with an unrecognized
157 name is encountered.</div>
158</td>
159</tr>
160</table>
161<ul class="blockList">
162<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
163<!--   -->
164</a>
165<h3>Methods inherited from class&nbsp;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>
166<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>
167</ul>
168</li>
169</ul>
170</li>
171</ul>
172</div>
173<div class="details">
174<ul class="blockList">
175<li class="blockList">
176<!-- ========= CONSTRUCTOR DETAIL ======== -->
177<ul class="blockList">
178<li class="blockList"><a name="constructor_detail">
179<!--   -->
180</a>
181<h3>Constructor Detail</h3>
182<a name="DeserializationProblemHandler()">
183<!--   -->
184</a>
185<ul class="blockListLast">
186<li class="blockList">
187<h4>DeserializationProblemHandler</h4>
188<pre>public&nbsp;DeserializationProblemHandler()</pre>
189</li>
190</ul>
191</li>
192</ul>
193<!-- ============ METHOD DETAIL ========== -->
194<ul class="blockList">
195<li class="blockList"><a name="method_detail">
196<!--   -->
197</a>
198<h3>Method Detail</h3>
199<a name="handleUnknownProperty(com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.JsonDeserializer, java.lang.Object, java.lang.String)">
200<!--   -->
201</a>
202<ul class="blockListLast">
203<li class="blockList">
204<h4>handleUnknownProperty</h4>
205<pre>public&nbsp;boolean&nbsp;handleUnknownProperty(<a href="../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</a>&nbsp;ctxt,
206                            com.fasterxml.jackson.core.JsonParser&nbsp;jp,
207                            <a href="../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</a>&lt;?&gt;&nbsp;deserializer,
208                            <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>&nbsp;beanOrClass,
209                            <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>&nbsp;propertyName)
210                              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>,
211                                     com.fasterxml.jackson.core.JsonProcessingException</pre>
212<div class="block">Method called when a JSON Map ("Object") entry with an unrecognized
213 name is encountered.
214 Content (supposedly) matching the property are accessible via
215 parser that can be obtained from passed deserialization context.
216 Handler can also choose to skip the content; if so, it MUST return
217 true to indicate it did handle property successfully.
218 Skipping is usually done like so:
219<pre>
220  jp.skipChildren();
221</pre>
222<p>
223 Note: version 1.2 added new deserialization feature
224 (<code>DeserializationConfig.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES</code>).
225 It will only have effect <b>after</b> handler is called, and only
226 if handler did <b>not</b> handle the problem.</div>
227<dl><dt><span class="strong">Parameters:</span></dt><dd><code>beanOrClass</code> - Either bean instance being deserialized (if one
228   has been instantiated so far); or Class that indicates type that
229   will be instantiated (if no instantiation done yet: for example
230   when bean uses non-default constructors)</dd><dd><code>jp</code> - Parser to use for handling problematic content</dd>
231<dt><span class="strong">Returns:</span></dt><dd>True if the problem is resolved (and content available used or skipped);
232  false if the handler did not anything and the problem is unresolved. Note that in
233  latter case caller will either throw an exception or explicitly skip the content,
234  depending on configuration.</dd>
235<dt><span class="strong">Throws:</span></dt>
236<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>
237<dd><code>com.fasterxml.jackson.core.JsonProcessingException</code></dd></dl>
238</li>
239</ul>
240</li>
241</ul>
242</li>
243</ul>
244</div>
245</div>
246<!-- ========= END OF CLASS DATA ========= -->
247<!-- ======= START OF BOTTOM NAVBAR ====== -->
248<div class="bottomNav"><a name="navbar_bottom">
249<!--   -->
250</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
251<!--   -->
252</a>
253<ul class="navList" title="Navigation">
254<li><a href="../../../../../overview-summary.html">Overview</a></li>
255<li><a href="package-summary.html">Package</a></li>
256<li class="navBarCell1Rev">Class</li>
257<li><a href="class-use/DeserializationProblemHandler.html">Use</a></li>
258<li><a href="package-tree.html">Tree</a></li>
259<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
260<li><a href="../../../../../index-all.html">Index</a></li>
261<li><a href="../../../../../help-doc.html">Help</a></li>
262</ul>
263</div>
264<div class="subNav">
265<ul class="navList">
266<li><a href="../../../../../com/fasterxml/jackson/databind/deser/DefaultDeserializationContext.Impl.html" title="class in com.fasterxml.jackson.databind.deser"><span class="strong">Prev Class</span></a></li>
267<li><a href="../../../../../com/fasterxml/jackson/databind/deser/DeserializerCache.html" title="class in com.fasterxml.jackson.databind.deser"><span class="strong">Next Class</span></a></li>
268</ul>
269<ul class="navList">
270<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.html" target="_top">Frames</a></li>
271<li><a href="DeserializationProblemHandler.html" target="_top">No Frames</a></li>
272</ul>
273<ul class="navList" id="allclasses_navbar_bottom">
274<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
275</ul>
276<div>
277<script type="text/javascript"><!--
278  allClassesLink = document.getElementById("allclasses_navbar_bottom");
279  if(window==top) {
280    allClassesLink.style.display = "block";
281  }
282  else {
283    allClassesLink.style.display = "none";
284  }
285  //-->
286</script>
287</div>
288<div>
289<ul class="subNavList">
290<li>Summary:&nbsp;</li>
291<li>Nested&nbsp;|&nbsp;</li>
292<li>Field&nbsp;|&nbsp;</li>
293<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
294<li><a href="#method_summary">Method</a></li>
295</ul>
296<ul class="subNavList">
297<li>Detail:&nbsp;</li>
298<li>Field&nbsp;|&nbsp;</li>
299<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
300<li><a href="#method_detail">Method</a></li>
301</ul>
302</div>
303<a name="skip-navbar_bottom">
304<!--   -->
305</a></div>
306<!-- ======== END OF BOTTOM NAVBAR ======= -->
307<p class="legalCopy"><small>Copyright &#169; 2014-2015 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p>
308</body>
309</html>
310