JSON

Converts a frame into json string.

Syntax

JSON(frame)
  • frame - The FROM_JSON frame to convert.

Sample Usage

JSON(C1)
{
 "name": "Sasha",
 "age": 16,
 "gender":"female",
    "pets": [
        {
            "nickname": "Alice",
            "kind": "cat",
            "age": 3
        },
        {
            "nickname": "Tina",
            "kind": "dog",
            "age": 2
        },
        {
            "nickname": "Goldy",
            "kind": "fish",
            "age": 1
        }
        ]
}

Return Value

  • This function always returns text according to a specified format.

Notes

JSON function treats single-row frame as an object, unless frame has _force_list column - in which case, frame will be converted to single-value json array.‌

See Also

Last updated

Was this helpful?