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
Is your feature request related to a problem? Please describe.
With Jackson 3, in order to support customer deserializers (specified with @JsonDeserialize(using = Deserializer.class)) with non-blocking parsing, Spring has to do mapper.readerFor(javaType).readValue(tokenBuffer.asParser(mapper._deserializationContext())) in its AbstractJacksonDecoder.
We introduced this using Jackson 2 via spring-projects/spring-framework#20526, but with Jackson 3 that's not ideal given the fact that ObjectMapper#_deserializationContext() is advertised as "only public to allow for testing".
With just mapper.readerFor(javaType).readValue(tokenBuffer.asParser()) we get an UnsupportedOperationException with "Operation not supported by ObjectReadContext of type tools.jackson.core.ObjectReadContext$Base".
Describe the solution you'd like
We would like that Jackson 3 offers a way to do non-blocking parsing of instance of classes with customer deserializers without having to invoke a test-related method.
Usage example
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
cowtowncoder
changed the title
Improve support for non-blocking parsing with custom serializers
Improve support for deserializing using TokenBuffer (f.ex for non-blocking parsing)
Apr 25, 2025
Hmmh. This will require some thinking. Perhaps specialized readValue() method that takes in TokenBuffer as source and can construct parser with DeserializationContext it manages.
cowtowncoder
changed the title
Improve support for deserializing using TokenBuffer (f.ex for non-blocking parsing)
Improve support for deserializing from TokenBuffer (f.ex for content buffered for non-blocking parsing)
Apr 26, 2025
Is your feature request related to a problem? Please describe.
With Jackson 3, in order to support customer deserializers (specified with
@JsonDeserialize(using = Deserializer.class)
) with non-blocking parsing, Spring has to domapper.readerFor(javaType).readValue(tokenBuffer.asParser(mapper._deserializationContext()))
in itsAbstractJacksonDecoder
.We introduced this using Jackson 2 via spring-projects/spring-framework#20526, but with Jackson 3 that's not ideal given the fact that
ObjectMapper#_deserializationContext()
is advertised as "only public to allow for testing".With just
mapper.readerFor(javaType).readValue(tokenBuffer.asParser())
we get anUnsupportedOperationException
with "Operation not supported byObjectReadContext
of type tools.jackson.core.ObjectReadContext$Base".Describe the solution you'd like
We would like that Jackson 3 offers a way to do non-blocking parsing of instance of classes with customer deserializers without having to invoke a test-related method.
Usage example
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: