-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow custom JsonNode implementations #3701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom JsonNode implementations #3701
Conversation
src/main/java/com/fasterxml/jackson/databind/node/NodeCursor.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
// [databind#3699]: custom array node classes | ||
public void testCustomArrayNode() throws Exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was already working before, this test just verifies it.
src/test/java/com/fasterxml/jackson/databind/node/CustomArrayNode.java
Outdated
Show resolved
Hide resolved
src/test/java/com/fasterxml/jackson/databind/node/CustomObjectNode.java
Outdated
Show resolved
Hide resolved
src/test/java/com/fasterxml/jackson/databind/node/CustomArrayNode.java
Outdated
Show resolved
Hide resolved
src/test/java/com/fasterxml/jackson/databind/node/CustomObjectNode.java
Outdated
Show resolved
Hide resolved
Ok, change itself is fine. One thing on test: it'd be great to have something bit more compact if possible, looks like there's a lot of boilerplate copied code. I assume this is due to this being a real use case (one where delegation is needed); but since test really does not exercise much of it a smaller subset might work? That is: could you just trim custom impls down to minimum needed for test. Not delegating all calls. |
Even when extending from |
Ah ok. Thank you for explanation that makes sense. |
Fixes #3699