Contact Free trial Login

JSON Module Reference

The JSON module contains tools to help you deal with JSON documents

Configurations


Config

Default configuration

Parameters

Name Type Description Default Value Required

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x 

Operations

Validate Schema

<json:validate-schema>

Validates that the input content is compliant with a given schema. This operation supports referencing many schemas (using comma as a separator) which include each other.

Parameters

Name Type Description Default Value Required

Schema

String

The location in which the schema to validate against is to be found. This attribute supports URI representations such as `+http://org.mule/schema.json+` or "resource:/schema.json". It also supports a most common classpath reference such as simply "schema.json".

x 

Content

Any

the json document to be validated

#[payload]

 

Schema Redirects

Array of Schema Redirect

Allows to redirect any given URI in the Schema (or even the schema location itself) to any other specific URI. The most common use case for this feature is to map external namespace URIs without the need to a local resource

 

Dereferencing

Enumeration, one of:

  • CANONICAL

  • INLINE

Draft v4 defines two dereferencing modes: canonical and inline. CANONICAL will be the default option but INLINE can also be specified. When validating a v3 draft this attribute is ignored.

CANONICAL

 

Allow Duplicate Keys

Boolean

if true, the validator will allow duplicate keys, otherwise it will fail.

true

 

Throws

  • JSON:INVALID_INPUT_JSON  

  • JSON:SCHEMA_NOT_HONOURED  

  • JSON:INVALID_SCHEMA  

  • JSON:SCHEMA_NOT_FOUND  

Types

Schema Redirect

Field Type Description Default Value Required

From

String

The original location

x

To

String

The redirection location

x

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.