You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by eeren-bm July 25, 2024
I think there's a bit of asymmetry when the lib is used to deserialized into primitive array vs List of objects. Please see the below example
The commented lines are lines I would expect to generate the similar results as List without throwing exceptions.
I believe the simple fix is to remove below lines from PrimitiveArrayDeserializers class' handleNonArray() method
// Empty String can become null...
if (p.hasToken(JsonToken.VALUE_STRING)) {
return _deserializeFromString(p, ctxt);
}
as they would almost certainly throw exception as getValueInstantiator() method is not being overriden to generate a sensible result. And a single string value will be dealt with correctly without above lines.
Thanks for looking ! Please kindly let me know your thoughts
The text was updated successfully, but these errors were encountered:
hi, just wondering if this is a sensible request for enhancement? I believe it'd be fine in terms of backwards compatibility too, I am happy to raise a PR if that's ok
Discussed in #4649
Originally posted by eeren-bm July 25, 2024
I think there's a bit of asymmetry when the lib is used to deserialized into primitive array vs List of objects. Please see the below example
The commented lines are lines I would expect to generate the similar results as List without throwing exceptions.
I believe the simple fix is to remove below lines from
PrimitiveArrayDeserializers
class'handleNonArray()
methodas they would almost certainly throw exception as
getValueInstantiator()
method is not being overriden to generate a sensible result. And a single string value will be dealt with correctly without above lines.Thanks for looking ! Please kindly let me know your thoughts
The text was updated successfully, but these errors were encountered: