Skip to content

Handle BinaryNode in NodeType #56

@DanielGronau

Description

@DanielGronau

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions