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.
Given a JSON tree containing a
BinaryNode
, validating it with json-schema-validator will cause a NPE: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 returnsVALUE_EMBEDDED_OBJECT
. This token type is not listed inNodeType.TOKEN_MAP
, causing the mentioned NPE. Adding a mapping fromVALUE_EMBEDDED_OBJECT
toSTRING
would solve the problem.