jsonProtection


Can be used in:

serviceProxy, api, stompProxy, swaggerProxy, if, registration, wsStompReassembler, interceptor, bean, internalProxy, transport and soapProxy

Syntax

<jsonProtection maxTokens="15"
  maxSize="<<Maximum size of a JSON document>>"
  maxDepth="<<Maximum depth of nested JSON structures>>"
  maxStringLength="<<Maximum length of a string field>>"
  maxKeyLength="<<Maximum length of an object's field name>>"
  maxObjectSize="<<Maximum number of fields in an object>>"
  maxArraySize="<<Maximum number of items in an array>>" />


Attributes

NameRequiredDefaultDescriptionExample
maxDepth false 50
Maximum depth of nested JSON structures. For example, <code>{"a":{"b":{"c":"d"}}}</code> has a depth of 3. -
maxKeyLength false 256
Maximum key length. For example, <code>{"abcd": "efgh123", "ijkl": [ "mnop123" ], "qrst": { "uvwx": 1}}</code> has a maximum key length of 4. (In this example, all 4 strings used as keys effectively have length 4.) The maximum key length also affects strings ("abcd", "ijkl", "qrst" and "uvwx" in the example). The strings can be also limited by the separate property maxStringLength. The stricter limit applies. -
maxObjectSize false 1000
Maximum size of JSON objects. For example, <code>{"a": {"b":"c", "d": "e"}, "f": "g"}</code> has a maximum object size of 2. (In this example, both objects effectively have a size of 2.) -
maxTokens false 10000
Maximum number of tokens a JSON document may consist of. For example, <code>{"a":"b"}</code> counts as 3. -
reportError false null
Overwrites default error reporting behaviour. If set to true, errors will provide ProblemDetails body, if set to false, errors will throw standard exceptions. -
maxSize false 52428800
Maximum total size of the JSON document in bytes. -
maxStringLength false 262144
Maximum string length. For example, <code>{"abcd": "efgh", "ijkl": [ "mnop" ], "qrst": { "uvwx": 1}}</code> has a maximum string length of 4. (In this example, all 6 strings effectively have length 4.) The maximum string length also affects keys ("abcd", "ijkl", "qrst" and "uvwx" in the example). The keys can be also limited by the separate property maxKeyLength. The stricter limit applies. -
maxArraySize false 1000
Maximum size of JSON objects. For example, <code>{"a": {"b":"c", "d": "e"}, "f": "g"}</code> has a maximum object size of 2. (In this example, both objects effectively have a size of 2.) -