• 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>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_35) on Tue Oct 09 17:08:12 PDT 2012 -->
6<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
7<TITLE>
8DeserializationProblemHandler (jackson-databind 2.1.0 API)
9</TITLE>
10
11<META NAME="date" CONTENT="2012-10-09">
12
13<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
14
15<SCRIPT type="text/javascript">
16function windowTitle()
17{
18    if (location.href.indexOf('is-external=true') == -1) {
19        parent.document.title="DeserializationProblemHandler (jackson-databind 2.1.0 API)";
20    }
21}
22</SCRIPT>
23<NOSCRIPT>
24</NOSCRIPT>
25
26</HEAD>
27
28<BODY BGCOLOR="white" onload="windowTitle();">
29<HR>
30
31
32<!-- ========= START OF TOP NAVBAR ======= -->
33<A NAME="navbar_top"><!-- --></A>
34<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
35<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
36<TR>
37<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
38<A NAME="navbar_top_firstrow"><!-- --></A>
39<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
40  <TR ALIGN="center" VALIGN="top">
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
43  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DeserializationProblemHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
48  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
49  </TR>
50</TABLE>
51</TD>
52<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
53</EM>
54</TD>
55</TR>
56
57<TR>
58<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
59&nbsp;<A HREF="../../../../../com/fasterxml/jackson/databind/deser/DefaultDeserializationContext.Impl.html" title="class in com.fasterxml.jackson.databind.deser"><B>PREV CLASS</B></A>&nbsp;
60&nbsp;<A HREF="../../../../../com/fasterxml/jackson/databind/deser/DeserializerCache.html" title="class in com.fasterxml.jackson.databind.deser"><B>NEXT CLASS</B></A></FONT></TD>
61<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
62  <A HREF="../../../../../index.html?com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
63&nbsp;<A HREF="DeserializationProblemHandler.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
64&nbsp;<SCRIPT type="text/javascript">
65  <!--
66  if(window==top) {
67    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
68  }
69  //-->
70</SCRIPT>
71<NOSCRIPT>
72  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
73</NOSCRIPT>
74
75
76</FONT></TD>
77</TR>
78<TR>
79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
81<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
82DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
83</TR>
84</TABLE>
85<A NAME="skip-navbar_top"></A>
86<!-- ========= END OF TOP NAVBAR ========= -->
87
88<HR>
89<!-- ======== START OF CLASS DATA ======== -->
90<H2>
91<FONT SIZE="-1">
92com.fasterxml.jackson.databind.deser</FONT>
93<BR>
94Class DeserializationProblemHandler</H2>
95<PRE>
96<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
97  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.fasterxml.jackson.databind.deser.DeserializationProblemHandler</B>
98</PRE>
99<HR>
100<DL>
101<DT><PRE>public abstract class <B>DeserializationProblemHandler</B><DT>extends <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
102</PRE>
103
104<P>
105This is the class that can be registered (via
106 <A HREF="../../../../../com/fasterxml/jackson/databind/DeserializationConfig.html" title="class in com.fasterxml.jackson.databind"><CODE>DeserializationConfig</CODE></A> object owner by
107 <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
108 recoverable problem is encountered during deserialization
109 process. Handlers can try to resolve the problem, throw
110 an exception or do nothing.
111<p>
112 Default implementations for all methods implemented minimal
113 "do nothing" functionality, which is roughly equivalent to
114 not having a registered listener at all. This allows for
115 only implemented handler methods one is interested in, without
116 handling other cases.
117<P>
118
119<P>
120<HR>
121
122<P>
123
124<!-- ======== CONSTRUCTOR SUMMARY ======== -->
125
126<A NAME="constructor_summary"><!-- --></A>
127<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
128<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
129<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
130<B>Constructor Summary</B></FONT></TH>
131</TR>
132<TR BGCOLOR="white" CLASS="TableRowColor">
133<TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.html#DeserializationProblemHandler()">DeserializationProblemHandler</A></B>()</CODE>
134
135<BR>
136&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
137</TR>
138</TABLE>
139&nbsp;
140<!-- ========== METHOD SUMMARY =========== -->
141
142<A NAME="method_summary"><!-- --></A>
143<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
144<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
145<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
146<B>Method Summary</B></FONT></TH>
147</TR>
148<TR BGCOLOR="white" CLASS="TableRowColor">
149<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
150<CODE>&nbsp;boolean</CODE></FONT></TD>
151<TD><CODE><B><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></B>(<A HREF="../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A>&nbsp;ctxt,
152                      <A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</A>&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
157<BR>
158&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method called when a JSON Map ("Object") entry with an unrecognized
159 name is encountered.</TD>
160</TR>
161</TABLE>
162&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
163<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
164<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
165<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
166</TR>
167<TR BGCOLOR="white" CLASS="TableRowColor">
168<TD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
169</TR>
170</TABLE>
171&nbsp;
172<P>
173
174<!-- ========= CONSTRUCTOR DETAIL ======== -->
175
176<A NAME="constructor_detail"><!-- --></A>
177<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
178<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
179<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
180<B>Constructor Detail</B></FONT></TH>
181</TR>
182</TABLE>
183
184<A NAME="DeserializationProblemHandler()"><!-- --></A><H3>
185DeserializationProblemHandler</H3>
186<PRE>
187public <B>DeserializationProblemHandler</B>()</PRE>
188<DL>
189</DL>
190
191<!-- ============ METHOD DETAIL ========== -->
192
193<A NAME="method_detail"><!-- --></A>
194<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
195<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
196<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
197<B>Method Detail</B></FONT></TH>
198</TR>
199</TABLE>
200
201<A NAME="handleUnknownProperty(com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.JsonDeserializer, java.lang.Object, java.lang.String)"><!-- --></A><H3>
202handleUnknownProperty</H3>
203<PRE>
204public boolean <B>handleUnknownProperty</B>(<A HREF="../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A>&nbsp;ctxt,
205                                     <A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</A>&nbsp;jp,
206                                     <A HREF="../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A>&lt;?&gt;&nbsp;deserializer,
207                                     <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,
208                                     <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)
209                              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>,
210                                     <A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></PRE>
211<DL>
212<DD>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 succesfully.
218 Skipping is usually done like so:
219<pre>
220  ctxt.getParser().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.
227<P>
228<DD><DL>
229<DT><B>Parameters:</B><DD><CODE>beanOrClass</CODE> - Either bean instance being deserialized (if one
230   has been instantiated so far); or Class that indicates type that
231   will be instantiated (if no instantiation done yet: for example
232   when bean uses non-default constructors)<DD><CODE>jp</CODE> - Parser to use for handling problematic content
233<DT><B>Returns:</B><DD>True if the problem is resolved (and content available used or skipped);
234  false if the handler did not anything and the problem is unresolved. Note that in
235  latter case caller will either throw an exception or explicitly skip the content,
236  depending on configuration.
237<DT><B>Throws:</B>
238<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>
239<DD><CODE><A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></CODE></DL>
240</DD>
241</DL>
242<!-- ========= END OF CLASS DATA ========= -->
243<HR>
244
245
246<!-- ======= START OF BOTTOM NAVBAR ====== -->
247<A NAME="navbar_bottom"><!-- --></A>
248<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
249<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
250<TR>
251<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
252<A NAME="navbar_bottom_firstrow"><!-- --></A>
253<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
254  <TR ALIGN="center" VALIGN="top">
255  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
256  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
257  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
258  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DeserializationProblemHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
259  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
260  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
261  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
262  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
263  </TR>
264</TABLE>
265</TD>
266<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
267</EM>
268</TD>
269</TR>
270
271<TR>
272<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
273&nbsp;<A HREF="../../../../../com/fasterxml/jackson/databind/deser/DefaultDeserializationContext.Impl.html" title="class in com.fasterxml.jackson.databind.deser"><B>PREV CLASS</B></A>&nbsp;
274&nbsp;<A HREF="../../../../../com/fasterxml/jackson/databind/deser/DeserializerCache.html" title="class in com.fasterxml.jackson.databind.deser"><B>NEXT CLASS</B></A></FONT></TD>
275<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
276  <A HREF="../../../../../index.html?com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
277&nbsp;<A HREF="DeserializationProblemHandler.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
278&nbsp;<SCRIPT type="text/javascript">
279  <!--
280  if(window==top) {
281    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
282  }
283  //-->
284</SCRIPT>
285<NOSCRIPT>
286  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
287</NOSCRIPT>
288
289
290</FONT></TD>
291</TR>
292<TR>
293<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
294  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
295<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
296DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
297</TR>
298</TABLE>
299<A NAME="skip-navbar_bottom"></A>
300<!-- ======== END OF BOTTOM NAVBAR ======= -->
301
302<HR>
303Copyright &#169; 2012 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.
304</BODY>
305</HTML>
306