Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2880

Add the JSON_PRETTY function

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • None

    Description

      ```
      JSON_PRETTY(*json_string_doc*)
      ```

      Returns the pretty formatted JSON document. Returns `NULL` if any argument is `NULL` or if JSON document is invalid.

      Example Sql:

      ```sql
      SELECT JSON_PRETTY(v) AS c1
      FROM (VALUES ('{"a": [10, true],"b": [10, true]}')) as t(v)
      limit 10
      ```

      Result:

      c1

      { "a" : [ 10, true ], "b" : [ 10, true ] }

       

      Attachments

        Activity

          People

            x1q1j1 Forward Xu
            ritesh.kapoor Ritesh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: