JSON
Interprets the given string as JSON.
This function takes a string that is a valid JSON representation and returns it as a JSON value. If the input string is not well-formed JSON, this function will throw an error. To check if a string is well-formed JSON without throwing an error, use JSON_VALID.
Example:
// SELECT JSON('{"a":1, "b":2}')
select(JSON("""{"a":1, "b":2}""")).execute()Return
A KQLiteJson representing the JSON value.
Author
MOHAMMAD AZIM ANSARI
Parameters
The string to be interpreted as JSON.
See also
Interprets the value from the given column as JSON.
This function takes a column containing a string that is a valid JSON representation and returns it as a JSON value. If the value in the column is not well-formed JSON, this function will throw an error at runtime. To check if a string is well-formed JSON without throwing an error, use JSON_VALID.
Example:
// Assuming 'MyTable' has a column 'jsonData' of type TEXT
val jsonData = jsonColumn("jsonData")
// SELECT JSON(jsonData) FROM MyTable;
select(JSON(jsonData)).from(MyTable).execute()Return
A KQLiteJson representing the JSON value.
Author
MOHAMMAD AZIM ANSARI
Parameters
The column containing the string to be interpreted as JSON.