From 136ffeda7399f8c1dbbac1f33ddd034b00172c74 Mon Sep 17 00:00:00 2001 From: Tyler Hobbs Date: Thu, 9 Jul 2015 11:54:11 -0500 Subject: [PATCH] Clarify CQL literal handling of JSON in CQL3 docs --- doc/cql3/CQL.textile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index ca0962704f..773ff913db 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -2000,7 +2000,9 @@ Any columns which are ommitted from the @JSON@ map will be defaulted to a @NULL@ h3(#jsonEncoding). JSON Encoding of Cassandra Data Types -Where possible, Cassandra will represent and accept data types in their native @JSON@ representation. Cassandra will also accept string representations matching the CQL literal format for all data types. The following table describes the encodings that Cassandra will accept in @INSERT JSON@ values (and @fromJson()@ arguments) as well as the format Cassandra will use when returning data for @SELECT JSON@ statements (and @fromJson()@): +Where possible, Cassandra will represent and accept data types in their native @JSON@ representation. Cassandra will also accept string representations matching the CQL literal format for all single-field types. For example, floats, ints, UUIDs, and dates can be represented by CQL literal strings. However, compound types, such as collections, tuples, and user-defined types must be represented by native @JSON@ collections (maps and lists) or a JSON-encoded string representation of the collection. + +The following table describes the encodings that Cassandra will accept in @INSERT JSON@ values (and @fromJson()@ arguments) as well as the format Cassandra will use when returning data for @SELECT JSON@ statements (and @fromJson()@): |_. type |_. formats accepted |_. return format |_. notes| |@ascii@ |string |string |Uses JSON's @\u@ character escape|