below is the code snippet:- ``` final JsonSchemaFactory factory = JsonSchemaFactory.byDefault(); final JsonNode node = JsonLoader.fromResource("/json-patch.json"); SCHEMA = factory.getJsonSchema(node); ``` in another method, i use it like this:- ``` ProcessingReport report = SCHEMA.validate(patchJson); ``` NPE exception comes when patchJson is passed as null. for reference json-patch.json is same as the one here:- https://github.com/fge/json-schema-processor-examples/blob/master/src/main/resources/json-patch.json
Activity