JSONFormatElements

Formats elements in JSON data to make them easier to read.

Format 

JSONFormatElements ( json )

Parameters 

json - any text expression or field that contains a JSON object or array.

Data type returned 

text

Originated in version 

16.0

Description 

This function parses the text in the json parameter. If successful, this function returns json with tab and line ending characters added and with JSON objects sorted alphabetically by key. Otherwise, this function returns "?" followed by an error message (see Handling errors in JSON data).

Example 1 

JSONFormatElements ( "{ \"a\" : { \"lnk\" : false, \"id\" : 12 } }" ) returns

Copy
{
    "a" : 
    {
        "id" : 12,
        "lnk" : false
    }
}