Skip to content

Gravitee Policy - XML to JSON Transformation

License

Notifications You must be signed in to change notification settings

gravitee-io/gravitee-policy-xml-json

Repository files navigation

XML to JSON transformation policy

Gravitee.io License Releases CircleCI

Compatibility matrix

Plugin version APIM version

1.x

3.x

2.x

4.0 to latest

Phase

onRequestContent onResponseContent

X

X

Description

You can use the xml-json policy to transform XML content to JSON content.

Configuration

You can configure the policy with the following options:

Property Required Description Type Default

scope

X

The execution scope (request or response).

string

RESPONSE

Example

"xml-json": {
    "scope": "RESPONSE"
}

Errors

HTTP status code

Code Message

500

The transformation cannot be executed properly

Nested objects

To limit the processing time and memory consumption in case of nested object, a default max depth of nested object has been defined to 100. This default value can be overridden using the environment variable gravitee_policy_xmljson_maxdepth.