Skip to content
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

Handle BinaryNode in NodeType #56

Open
DanielGronau opened this issue Jul 23, 2020 · 0 comments
Open

Handle BinaryNode in NodeType #56

DanielGronau opened this issue Jul 23, 2020 · 0 comments

Comments

@DanielGronau
Copy link

Given a JSON tree containing a BinaryNode, validating it with json-schema-validator will cause a NPE:

 java.lang.NullPointerException: unhandled token type VALUE_EMBEDDED_OBJECT

The underlying issue is that while Jackson will serialize and deserialize the binary value to and from a (base64 encoded) string, the BinaryNode.asToken method returns VALUE_EMBEDDED_OBJECT. This token type is not listed in NodeType.TOKEN_MAP, causing the mentioned NPE. Adding a mapping from VALUE_EMBEDDED_OBJECT to STRING would solve the problem.

@DanielGronau DanielGronau changed the title Handle BinaryNode correctly Handle BinaryNode in NodeType Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant