Page tree
Skip to end of metadata
Go to start of metadata

JSON attributes can be manipulated with the following expressions:

  • ${json.attribute}
  • ${string_of(json.attribute)}
  • ${json.attribute['/content/page']}
  • ${json.attribute[pointer]}
  • ${table.attribute['keywithjsonvalue']['/content/page']}
  • ${json_defined(json.attribute, '/content/page')}

A JSON Pointer (RFC6901) can have the following values:

  • /content/page/1
  • /content/page/-
  • ${pointer} with ${pointer} = /content/page/1
  • /${pointer}/page/1 avec ${pointer} = content
  • /content/page/-

A JSON Pointer is case sensitive, '/content' is not equal to '/Content'.

A JSON attribute can be created from a table attribute by using the expression json_of().

Example:

Result:

{"Host":"192.168.150.72", "User-Agent":"Mozilla/5.0 (X11; Ubuntu; Linux ..." ... }

Decision node with JSON attributes

A JSON attribute can be selected in a decision node to perform a comparison. See the examples bellow:

 

# Attribut JSON "user_infos_login"
"support"

# Attribut JSON "user_infos"
{"login": "support", "name": "Dupont", ...}

 

Manipulation with the JSON Attribute Get node

Manipulation examples
JSON input

JSON Pointer

JSON output

 
/title
/properties/firstname

json.failure: true

json.err_message: <EXCEPTION>: JSON error (Unable to find value)

/properties/firstName
/properties/age/minimum
/required
/required/0
/required/1
/required/-

json.failure: true

json.err_message: <EXCEPTION>: JSON error (Unable to find value)

/required/10

json.failure: true

json.err_message: <EXCEPTION>: JSON error (Unable to find value)

Manipulation with the JSON Attribute Set node

Manipulation examples
JSON input

JSON Pointer

JSON output

JSON Pointer 
Value's typeString
ValuePerson
JSON Pointer/title
Value's typeString
ValuePerson
JSON Pointer/properties/firstName/type
Value's typeString
Valuestring
JSON Pointer/properties/age/minimum 
Value's typeBoolean
Valuetrue
JSON Pointer/properties/age/minimum
Value's typeNumber (Int)
Value0
JSON Pointer/properties/age
Value's typeJSON
Value
{
"description": "Age",
"type": "integer",
"minimum": 0
}
JSON Pointer/required/0
Value's typeString
ValuefirstName
JSON Pointer/required/-
Value's typeString
ValuelastName
JSON Pointer/optional/-
Value's typeString
Valueage
JSON Pointer/required/2/age
Value's typeBoolean
Valuefalse