JSON Functions

Encodes / Decodes JSON Strings. Parses JSON Strings.
  • JSONPARSE

    Parses a string and returns as array or object.

    JSONPARSE("[1,2,3]")
    Try this example
    json_string (string)
    A string written in JSON format
  • JSONSTRINGIFY

    Converts array or object into string.

    JSONSTRINGIFY([1,2,3])
    Try this example
    array (array)
    Array or object
  • JSON_DECODE

    Decodes a JSON string

    JSON_DECODE("[1,2,3]")
    Try this example
    json (string)
    The json string being decoded. This function only works with UTF-8 encoded strings.
  • JSON_ENCODE

    Returns the JSON representation of a value

    JSON_ENCODE([1,2,3])
    Try this example
    value (array)
    The value being encoded. Can be any type except a resource. All string data must be UTF-8 encoded.