Skip to main content

IsJson - script and chart function

IsJson() tests whether a specified string contains valid JSON (JavaScript Object Notation) data. You can also validate a specific JSON data type.

Syntax:

value IsJson(json [, type])

Return data type: dual

Arguments
Argument Description
json String to test. It can contain extra spaces or newlines.
type

Optional argument that specifies the JSON data type to test for.

  • 'value' (default)

  • 'object'

  • 'array'

  • 'string'

  • 'number'

  • 'Boolean'

  • 'null'

See also: