WIP iterative UntypedObjectDeserializer #3427
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a WIP iterative implementation of UntypedObjectDeserializer. (see #3416 (comment) )
I looked at the existing JsonNodeDeserializer impl, and it is a bit better than this one (it uses a queue, and no intermediate worker objects, unlike this impl). However I don't think that approach can be easily adapted to work with arrays, it relies on adding the child collections to the parent immediately, which can be done with
ArrayNode
and could be done withList
, but can't be done with arrays because they have fixed size (need to add to the parent after it's done).Things left to do:
USE_JAVA_ARRAY_FOR_JSON_ARRAY
I've run the databind tests for this draft, and they pass, or at least don't fail more than without the changes. There are some tests that I think fail for me because I use java 17, not sure what's up with that, but they seem to be unaffected by these changes.