• 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_29) on Mon Mar 26 19:07:13 PDT 2012 -->
6<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
7<TITLE>
8DeserializationProblemHandler (jackson-databind 2.0.0 API)
9</TITLE>
10
11<META NAME="date" CONTENT="2012-03-26">
12
13<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
14
15<SCRIPT type="text/javascript">
16function windowTitle()
17{
18    if (location.href.indexOf('is-external=true') == -1) {
19        parent.document.title="DeserializationProblemHandler (jackson-databind 2.0.0 API)";
20    }
21}
22</SCRIPT>
23<NOSCRIPT>
24</NOSCRIPT>
25
26</HEAD>
27
28<BODY BGCOLOR="white" onload="windowTitle();">
29<HR>
30
31
32<!-- ========= START OF TOP NAVBAR ======= -->
33<A NAME="navbar_top"><!-- --></A>
34<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
35<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
36<TR>
37<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
38<A NAME="navbar_top_firstrow"><!-- --></A>
39<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
40  <TR ALIGN="center" VALIGN="top">
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&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<DL>
121<DT><B>Author:</B></DT>
122  <DD>tatu</DD>
123</DL>
124<HR>
125
126<P>
127
128<!-- ======== CONSTRUCTOR SUMMARY ======== -->
129
130<A NAME="constructor_summary"><!-- --></A>
131<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
132<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
133<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
134<B>Constructor Summary</B></FONT></TH>
135</TR>
136<TR BGCOLOR="white" CLASS="TableRowColor">
137<TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.html#DeserializationProblemHandler()">DeserializationProblemHandler</A></B>()</CODE>
138
139<BR>
140&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
141</TR>
142</TABLE>
143&nbsp;
144<!-- ========== METHOD SUMMARY =========== -->
145
146<A NAME="method_summary"><!-- --></A>
147<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
148<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
149<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
150<B>Method Summary</B></FONT></TH>
151</TR>
152<TR BGCOLOR="white" CLASS="TableRowColor">
153<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
154<CODE>&nbsp;boolean</CODE></FONT></TD>
155<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,
156                      com.fasterxml.jackson.core.JsonParser&nbsp;jp,
157                      <A HREF="../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A>&lt;?&gt;&nbsp;deserializer,
158                      <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,
159                      <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>
160
161<BR>
162&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method called when a Json Map ("Object") entry with an unrecognized
163 name is encountered.</TD>
164</TR>
165</TABLE>
166&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
167<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
168<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
169<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>
170</TR>
171<TR BGCOLOR="white" CLASS="TableRowColor">
172<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>
173</TR>
174</TABLE>
175&nbsp;
176<P>
177
178<!-- ========= CONSTRUCTOR DETAIL ======== -->
179
180<A NAME="constructor_detail"><!-- --></A>
181<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
182<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
183<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
184<B>Constructor Detail</B></FONT></TH>
185</TR>
186</TABLE>
187
188<A NAME="DeserializationProblemHandler()"><!-- --></A><H3>
189DeserializationProblemHandler</H3>
190<PRE>
191public <B>DeserializationProblemHandler</B>()</PRE>
192<DL>
193</DL>
194
195<!-- ============ METHOD DETAIL ========== -->
196
197<A NAME="method_detail"><!-- --></A>
198<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
199<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
200<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
201<B>Method Detail</B></FONT></TH>
202</TR>
203</TABLE>
204
205<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>
206handleUnknownProperty</H3>
207<PRE>
208public boolean <B>handleUnknownProperty</B>(<A HREF="../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A>&nbsp;ctxt,
209                                     com.fasterxml.jackson.core.JsonParser&nbsp;jp,
210                                     <A HREF="../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A>&lt;?&gt;&nbsp;deserializer,
211                                     <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,
212                                     <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)
213                              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>,
214                                     com.fasterxml.jackson.core.JsonProcessingException</PRE>
215<DL>
216<DD>Method called when a Json Map ("Object") entry with an unrecognized
217 name is encountered.
218 Content (supposedly) matching the property are accessible via
219 parser that can be obtained from passed deserialization context.
220 Handler can also choose to skip the content; if so, it MUST return
221 true to indicate it did handle property succesfully.
222 Skipping is usually done like so:
223<pre>
224  ctxt.getParser().skipChildren();
225</pre>
226<p>
227 Note: version 1.2 added new deserialization feature
228 (<code>DeserializationConfig.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES</code>).
229 It will only have effect <b>after</b> handler is called, and only
230 if handler did <b>not</b> handle the problem.
231<P>
232<DD><DL>
233<DT><B>Parameters:</B><DD><CODE>beanOrClass</CODE> - Either bean instance being deserialized (if one
234   has been instantiated so far); or Class that indicates type that
235   will be instantiated (if no instantiation done yet: for example
236   when bean uses non-default constructors)<DD><CODE>jp</CODE> - Parser to use for handling problematic content
237<DT><B>Returns:</B><DD>True if the problem was succesfully resolved (and content available
238    used or skipped); false if listen
239<DT><B>Throws:</B>
240<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>
241<DD><CODE>com.fasterxml.jackson.core.JsonProcessingException</CODE></DL>
242</DD>
243</DL>
244<!-- ========= END OF CLASS DATA ========= -->
245<HR>
246
247
248<!-- ======= START OF BOTTOM NAVBAR ====== -->
249<A NAME="navbar_bottom"><!-- --></A>
250<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
251<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
252<TR>
253<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
254<A NAME="navbar_bottom_firstrow"><!-- --></A>
255<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
256  <TR ALIGN="center" VALIGN="top">
257  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
258  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
259  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
260  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DeserializationProblemHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
261  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
262  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
263  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
264  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
265  </TR>
266</TABLE>
267</TD>
268<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
269</EM>
270</TD>
271</TR>
272
273<TR>
274<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
275&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;
276&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>
277<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
278  <A HREF="../../../../../index.html?com/fasterxml/jackson/databind/deser/DeserializationProblemHandler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
279&nbsp;<A HREF="DeserializationProblemHandler.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
280&nbsp;<SCRIPT type="text/javascript">
281  <!--
282  if(window==top) {
283    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
284  }
285  //-->
286</SCRIPT>
287<NOSCRIPT>
288  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
289</NOSCRIPT>
290
291
292</FONT></TD>
293</TR>
294<TR>
295<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
296  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
297<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
298DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
299</TR>
300</TABLE>
301<A NAME="skip-navbar_bottom"></A>
302<!-- ======== END OF BOTTOM NAVBAR ======= -->
303
304<HR>
305Copyright &#169; 2012 <a href="http://fasterxml.com">fasterxml.com</a>. All Rights Reserved.
306</BODY>
307</HTML>
308