validate_jsonfile_with_schema: Validate a JSON file against a JSON Schema string

Description Usage Arguments Examples

Description

Description

Usage

1
validate_jsonfile_with_schema(jsonfn, schema_string)

Arguments

jsonfn

The JSON file

schema_string

The JSON Schema string This function will check that the supplied schema is not empty and it will then validate that the JSON file is accessible and valid (and well formed) w.r.t the supplied schema file.

Examples

1
2
3
4
5
## Not run: 
json_code <- "{\"category\": \"book\", \"price\": 25,  \"title\": \"abrakadabra\"}"
validate_json_with_schemafile(json_code, "data/schema.json")

## End(Not run)

validatejsonr documentation built on May 1, 2019, 8:02 p.m.