Skip to content

Commit

Permalink
Add doctext row
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Carbonetto <[email protected]>
  • Loading branch information
acarbonetto committed Jan 21, 2025
1 parent c6c6cc1 commit a5652ea
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions docs/user/ppl/functions/json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ Return type: BOOLEAN/DOUBLE/INTEGER/NULL/STRUCT/ARRAY
Example::

> source=json_test | where json_valid(json_string) | eval json=json(json_string) | fields test_name, json_string, json
fetched rows / total rows = 4/4
+---------------------+------------------------------+---------------+
| test_name | json_string | json |
|---------------------|------------------------------|---------------|
| json object | {"a":"1","b":"2"} | {a:"1",b:"2"} |
| json array | [1, 2, 3, 4] | [1,2,3,4] |
| json scalar string | "abc" | "abc" |
| json empty string | | null |
+---------------------+------------------------------+---------------+
fetched rows / total rows = 5/5
+---------------------+---------------------------------+-------------------------+
| test_name | json_string | json |
|---------------------|---------------------------------|-------------------------|
| json nested object | {"a":"1","b":{"c":"2","d":"3"}} | {a:"1",b:{c:"2",d:"3"}} |
| json object | {"a":"1","b":"2"} | {a:"1",b:"2"} |
| json array | [1, 2, 3, 4] | [1,2,3,4] |
| json scalar string | "abc" | "abc" |
| json empty string | | null |
+---------------------+---------------------------------+-------------------------+

0 comments on commit a5652ea

Please sign in to comment.