]> mj.ucw.cz Git - libucw.git/commitdiff
JSON: Comment on what is a string value
authorMartin Mares <mj@ucw.cz>
Fri, 17 Jul 2015 14:08:00 +0000 (16:08 +0200)
committerMartin Mares <mj@ucw.cz>
Fri, 17 Jul 2015 14:08:00 +0000 (16:08 +0200)
ucw-json/json.h

index 799d88842642e1ac33f5e3d4fac42cd1337cf28c..199b65371186f51a503ae3b459b68c6ffc622a76 100644 (file)
@@ -215,7 +215,13 @@ bool json_number_to_s64(struct json_node *num, s64 *dest);
 /** Same as above, but for `u64`. **/
 bool json_number_to_u64(struct json_node *num, u64 *dest);
 
-/** Creates a new string value. The @value is kept only as a reference. **/
+/**
+ * Creates a new string value. The @value is kept only as a reference.
+ *
+ * String values can contain an arbitrary UTF-8 string with no null
+ * characters. However, it is not recommended to use UTF-8 values outside
+ * the range of UniCode codepoints (0 to 0x10ffff).
+ **/
 static inline struct json_node *json_new_string_ref(struct json_context *js, const char *value)
 {
   struct json_node *n = json_new_node(js, JSON_STRING);