Skip to main content
Skip table of contents

JSON Validation

This adapter validates an input JSON document against a JSON schema. If the verified JSON document is valid, the adapter will output the document unalteredly. Otherwise, an XML document with a corresponding error message will be output.

Properties

Operation

Defines the operation executed by the function adapter

Possible values: Validate: Validate the JSON document

Parameters

Adapter

Main adapter class (do not change!)

Possible values: de.softproject.integration.adapter.json.JSONValidator: Main class (Default)

schemaURL

Path to the schema definition (JSON schema)

Possible values: Any xstore:// URL (e. g. xstore://Project/Folder/Schema.json)

Status values

-1 (error)

An error occurred during the adapter's execution. You can find more information in the server log.

1 (successful)

The verified JSON document is valid according to the defined schema. The adapter outputs the verified input JSON document unalteredly.

0

The verified JSON document is not valid according to the defined schema. The adapter outputs a corresponding error message (see Output).

Input

The adapter expects a JSON document as input, which is subsequently validated against a JSON schema.

Output

In case of a successful validation, the adapter outputs the input document unalteredly. Otherwise, if the JSON document ist not valid, an XML document with a corresponding error message is output. In this case, for each error an XML element <Error/> is generated, which contains a detailed error description, e.g.:

Example of an error message

XML
<ValidationErrors>
    <Error>#/rectangle/a: -5.0 is not higher or equal to 0</Error>
</ValidationErrors>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.