Whether to submit and return the JSON encoding for CQL data types.
Cassandra 2.2 introduced a CQL extension that allows you to JSON-encode CQL data types. By default, you use the JSON syntax to manipulate data and SELECT statements return JSON through the driver. Set this property to false to use CQL literals to interact with Cassandra data.
The syntax for CQL literals has several differences from JSON. For example:
- CQL strings are defined in single quotes, while JSON strings are defined in double quotes.
- CQL sets, tuples, and lists are JSON-encoded as arrays.
- User-defined types and CQL uuid types are JSON-encoded as objects.
INSERT INTO users (user_id, emails) VALUES(@user_id, @emails)
INSERT INTO users (user_id, emails) VALUES (@user_id, @emails)
Note that in queries to the driver, you must use single quotes to define strings.