j_schema_is_vaild()
uses JSON Schema
https://json-schema.org/ to validate JSON 'data' according to
'schema'.
j_schema_validate()
returns a JSON or R object,
data.frame, or tibble, describing how data
does not conform
to schema
. See the "Using 'jsoncons' in R" vignette for help
interpreting validation results.
j_schema_is_valid(
data,
schema,
...,
data_type = j_data_type(data),
schema_type = j_data_type(schema)
)j_schema_validate(
data,
schema,
as = "string",
...,
data_type = j_data_type(data),
schema_type = j_data_type(schema)
)
JSON character vector, file, or URL defining document to be validated. NDJSON data and schema are not supported.
JSON character vector, file, or URL defining the
schema against which data
will be validated.
passed to jsonlite::toJSON
when data
is not
character-valued.
character(1) type of data
; one of "json"
or a
value returned by j_data_type()
; schema validation does not
support "ndjson"
data.
character(1) type of schema
; see data_type
.
for j_schema_validate()
, one of "string"
, "R"
,
"data.frame"
, "tibble"
, or "details"
, to determine the
representation of the return value.