All Products
Search
Document Center

Lindorm:Support on JSON

Last Updated:Mar 28, 2026

Lindorm Cassandra Query Language (CQL) supports JSON in SELECT and INSERT statements. JSON support does not change how the Lindorm CQL API works — you still define a schema, and the JSON format simply provides a way to read and write column data as JSON documents.

SELECT JSON

Add the JSON keyword to a SELECT statement to return each row as a JSON-encoded map.

SELECT JSON a, b FROM <table_name>;

The map keys match the column names in a regular result set. For example, the statement above returns a map with the keys "a" and "b".

INSERT JSON

Add the JSON keyword to an INSERT statement to insert a JSON-encoded map as a row. The JSON map format must match the result set format that SELECT JSON returns for the same table. Enclose case-sensitive column names in double quotation marks (").

INSERT INTO persioninfo JSON '{ "c1": "key", "c2": "value"}'

By default, columns not included in the JSON map are set to null, and any existing values for those columns are removed.

JSON encoding of CQL data types

Lindorm CQL represents and accepts most data types in their native JSON format, and also accepts string representations for all single-field types (for example, float values, integers, UUIDs, and dates can be represented as CQL text strings).

The following table describes the JSON types that Lindorm CQL accepts in INSERT JSON statements and fromJson() calls, and the types it returns in SELECT JSON statements and toJson() calls.

CQL data typeAccepted JSON typeReturned JSON typeDescription
asciistringstringUses \u JSON escape sequences.
bigintinteger, stringintegerString must be a valid 64-bit integer.
blobstringstringString must be an even number of hexadecimal digits prefixed with 0x.
booleanboolean, stringbooleanValid string values: true and false.
datestringstringDate in YYYY-MM-DD format, displayed in UTC.
decimalinteger, float, stringfloatPrecision may exceed that of a 32-bit or 64-bit IEEE 754 floating-point number.
doubleinteger, float, stringfloatString must represent a valid integer or floating-point number.
floatinteger, float, stringfloatString must represent a valid integer or floating-point number.
inetstringstringIPv4 or IPv6 address.
intinteger, stringintegerString must represent a 32-bit integer.
smallintinteger, stringintegerString must represent a 16-bit integer.
textstringstringUses \u JSON escape sequences.
timestringstringTime in hh-mm-ss[.fffffffff] format.
timestampinteger, stringstringString in YYYY-MM-DD hh:mm:ss.SSS format.
timeuuidstringstringType 1 UUID.
tinyintinteger, stringintegerString must be a valid 8-bit integer.
uuidstringstringUUID format.
varintinteger, stringintegerVariable-length integer. Integer overflow may occur when a 32-bit or 64-bit integer is transferred to a client-side decoder.