JSONB

Interprets the given string as JSON and returns its binary representation (BLOB).

This function is similar to JSON() but it returns a BLOB that is a binary representation of the JSON, which can be processed more efficiently by other JSON functions. If the input string is not well-formed JSON, this function will throw an error.

Example:

// SELECT JSONB('{"a":1, "b":2}')
select(JSONB("""{"a":1, "b":2}""")).execute()

Return

A KQLiteJson representing the binary JSON value (BLOB).

Author

MOHAMMAD AZIM ANSARI

Parameters

json

The string to be interpreted as JSON.

See also


Interprets the value from the given column as JSON and returns its binary representation (BLOB).

This function is similar to JSON() but it returns a BLOB that is a binary representation of the JSON, which can be processed more efficiently by other JSON functions. If the value in the column is not well-formed JSON, this function will throw an error at runtime.

Example:

// Assuming 'MyTable' has a column 'jsonData' of type TEXT
val jsonData = textColumn("jsonData")

// SELECT JSONB(jsonData) FROM MyTable;
select(JSONB(jsonData)).from(MyTable).execute()

Return

A KQLiteJson representing the binary JSON value (BLOB).

Author

MOHAMMAD AZIM ANSARI

Parameters

json

The column containing the string to be interpreted as JSON.

See also