JSON contains multiple data types, including text, boolean, value, array, and map.
For JSON fields, fields of text type and boolean type are automatically recognized.
For example, the following jsonkey can be queried by using the conditions such as
You can query the double or long type data that is not in the JSON array by setting the type and specifying the path.
For example, the type of the jsonkey.key3 field is double. Then, the query statement is as follows:
jsonkey.key3 > 3
Log Service attempts to parse the valid contents until the invalid content appears.
"key_1" : "value_1",
"key_2" : "value_2",
"key_3" : "valu
key_3 is truncated and lost. The field
json_string.key_map.key_2 and contents before this field are successfully parsed.
- JSON object type and JSON array type are not supported.
- The field cannot be in a JSON array.
- Boolean fields can be converted to the text type.
To query a specific key, you must add the parent path prefix of JSON in the query statement. The text type and value type of JSON have the same query syntax as those of non-JSON. For more information, see Query syntax.