The valjson | json command validates one or more JSON instance documents according to the JSON schema supplied with the --schema option.
raptorxmlxbrl valjson | json [options] --jsonschema=File InputFile |
•The InputFile argument is the JSON instance document to validate.
•To validate multiple documents, either: (i) list the files to be validated on the CLI, with each file separated from the next by a space; or (ii) list the files to be validated in a text file (.txt file), with one filename per line, and supply this text file as the InputFile argument together with the --listfile option set to true (see the Options list below).
Examples
Examples of the valjson command:
•raptorxmlxbrl valjson --jsonschema=c:\MyJSONSchema.json c:\MyJSONInstance.json
•raptorxmlxbrl json --jsonschema=c:\MyJSONSchema.json c:\MyJSONInstance-01.json c:\MyJSONInstance-02.json
•raptorxmlxbrl json --jsonschema=c:\MyJSONSchema.json --listfile=true c:\FileList.txt
RaptorXMLXBRL (and RaptorXMLXBRLServer for administration commands) on Windows raptorxmlxbrl (and raptorxmlxbrlserver for administration commands) on Windows and Unix (Linux, Mac) * Note that lowercase (raptorxmlxbrl and raptorxmlxbrlserver) works on all platforms (Windows, Linux, and Mac), while upper-lower (RaptorXMLXBRL) works only on Windows and Mac. * Use forward slashes on Linux and Mac, backslashes on Windows. |
On Windows systems: When spaces or special characters occur in strings (for example in file or folder names, or company, person or product names), use quotes: for example, "My File". Note, however, that a backslash followed by a double-quotation mark (for example, "C:\My directory\") might not be read correctly. This is because the backslash character is also used to indicate the start of an escape sequence, and the escape sequence \" stands for the double-quotation mark character. If you want to escape this sequence of characters, use a preceding backslash, like this: \\". To summarize: If you need to write a file path that contains spaces or an end backslash, write it like this: "C:\My Directory\\". |
Options
Options are listed in short form (if available) and long form. You can use one or two dashes for both short and long forms. An option may or may not take a value. If it takes a value, it is written like this: --option=value. Values can be specified without quotes except in two cases: (i) when the value string contains spaces, or (ii) when explicitly stated in the description of the option that quotes are required. If an option takes a Boolean value and no value is specified, then the option's default value is TRUE. Use the --h, --help option to display information about the command.
--schema = FILE, --jsonschema = FILE Specifies the path to the JSON Schema document to use for the validation of JSON instance documents. |
--listfile = true|false If true, treats the command's InputFile argument as a text file containing one filename per line. Default value is false. (An alternative is to list the files on the CLI with a space as separator. Note, however, that CLIs have a maximum-character limitation.) Note that the --listfile option applies only to arguments, and not to options. Note: Boolean option values are set to true if the option is specified without a value. |
--additional-schema = FILE Specifies URIs of an additional schema document. The additional schema will be loaded by the main schema and can be referenced from the main schema by the additional schemas id or \$id property. |
--recurse = true|false Used to select files within sub-directories, including in ZIP archives. If true, the command's InputFile argument will select the specified file also in subdirectories. For example: "test.zip|zip\test.xml" will select files named test.xml at all folder levels of the zip folder. References to ZIP files must be given in quotes. The wildcard characters * and ? may be used. So, *.xml will select all .xml files in the (zip) folder. The option's default value is false. Note: Boolean option values are set to true if the option is specified without a value. |
--json5 = true|false Enables JSON5 support. Default value is false. Note: Boolean option values are set to true if the option is specified without a value. |
--jsonc = true|false Enables support for comments in JSON. Default value is false. Note: Boolean option values are set to true if the option is specified without a value. |
--json-lines = true|false Enables support for JSON Lines (that is, one JSON value per line). Default value is false. Note: Boolean option values are set to true if the option is specified without a value. |
--jsonschema-version = draft04|draft06|draft07|2019-09|2020-12|latest|detect Specifies which version of the JSON Schema specification draft version to use. Default is detect. |
--disable-format-checks = true|false Disables the semantic validation imposed by the format attribute. Default value is false. Note: Boolean option values are set to true if the option is specified without a value. |
--strict-integer-checks = true|false Specifies whether the stricter integer checks of draft-04 should be used with later schemas—where integer checks are looser. For example, 1.0 is not a valid integer in draft-04, but is a valid integer in later drafts. This option has no effect for draft-04 schemas. The default value of the option is false. Note: Boolean option values are set to true if the option is specified without a value. |
|
--catalog = FILE Specifies the absolute path to a root catalog file that is not the installed root catalog file. The default value is the absolute path to the installed root catalog file (<installation-folder>\Altova\RaptorXMLXBRLServer2024\etc\RootCatalog.xml). See the section, XML Catalogs, for information about working with catalogs. |
--user-catalog = FILE Specifies the absolute path to an XML catalog to be used in addition to the root catalog. See the section, XML Catalogs, for information about working with catalogs. |
--enable-globalresources = true|false Enables global resources. Default value is false. Note: Boolean option values are set to true if the option is specified without a value. |
|
--error-format = text|shortxml|longxml Specifies the format of the error output. Default value is text. The other options generate XML formats, with longxml generating more detail. |
--error-limit = N | unlimited Specifies the error limit with a value range of 1 to 9999 or unlimited. The default value is 100. Processing stops when the error limit is reached. Useful for limiting processor use during validation/transformation. |
--info-limit = N | unlimited Specifies the information message limit in the range 1-65535 or unlimited. Processing continues if the specified info limit is reached, but further messages are not reported. The default value is 100. |
--help Displays help text for the command. For example, valany --h. (Alternatively the help command can be used with an argument. For example: help valany.) |
--listfile = true|false If true, treats the command's InputFile argument as a text file containing one filename per line. Default value is false. (An alternative is to list the files on the CLI with a space as separator. Note, however, that CLIs have a maximum-character limitation.) Note that the --listfile option applies only to arguments, and not to options. Note: Boolean option values are set to true if the option is specified without a value. |
--log-output = FILE Writes the log output to the specified file URL. Ensure that the CLI has write permission to the output location. |
--network-timeout = VALUE Specifies the timeout in milliseconds for remote I/O operations. Default is: 40000. |
--recurse = true|false Used to select files within sub-directories, including in ZIP archives. If true, the command's InputFile argument will select the specified file also in subdirectories. For example: "test.zip|zip\test.xml" will select files named test.xml at all folder levels of the zip folder. References to ZIP files must be given in quotes. The wildcard characters * and ? may be used. So, *.xml will select all .xml files in the (zip) folder. The option's default value is false. Note: Boolean option values are set to true if the option is specified without a value. |
--verbose = true|false A value of true enables output of additional information during validation. Default value is false. Note: Boolean option values are set to true if the option is specified without a value. |
--verbose-output = FILE Writes verbose output to FILE. |
--version Displays the version of RaptorXML+XBRL Server. If used with a command, place --version before the command. |
--warning-limit = N | unlimited Specifies the warning limit in the range 1-65535 or unlimited. Processing continues if this limit is reached, but further warnings are not reported. The default value is 100. |
|