Closed popematt closed 2 years ago
@popematt Ok, looks like there is some issue with Jackson 3.0 and these changes -- looks like there is somehow no failure for unknown symbols? I don't know how to look into possible problem so pushed changes to master
.
But would appreciate help in figuring out what is going on, if possible.
Note that changes between 2.x and 3.0 wrt renamed methods should not change semantics. But I guess something is changed...
Reopening the issue; leaving the patch in for now.
I think now that #314 is merged, we can close this, right @cowtowncoder ?
Yes.
In some cases, the IonObjectMapper is not correctly catching and wrapping IonExceptions. For example, given this class:
When attempting to deserialize invalid Ion, sometimes we get a JsonMappingException, and other times an IonException.
Why does this matter? Some other libraries (eg. Ktor, in the
JacksonConverter
) expect particular exceptions (eg.JsonParseException
orJsonMappingException
) from anObjectMapper
, and behave in unexpected ways when theIonException
leaks through.I believe the fix for this is to catch and wrap
IonException
as aJsonParseException
in theIonParser.nextToken()
method, and I intend to work on a PR for it.