Set the schema from user input

set_schema(format = "1.0", schema = NULL)

Arguments

format

String. JSON data schema version number. There are currently three schemas supported: "1.0", "1.1", "2.0" and "3.0". Formats "1.0" and "1.1" are included for backward compatibility only. Use format = "3.0" for new applications.

schema

A file name (optionally including the path) with the JSON validation schema. The schema argument overrides format. The function extracts the version number for the basename, and overwrites the format argument by version number.

Value

A list with components format (either 1.0, 1.1, 2.0

or 3.0), schema (long file name) and schema_base (base file name).

Examples

set_schema("3.0")
#> $format
#> [1] "3.0"
#> 
#> $schema
#> [1] "/home/runner/work/_temp/Library/bdsreader/schemas/bds_v3.0.json"
#> 
#> $schema_base
#> [1] "bds_v3.0.json"
#>