From 8a5a42f0f35ac10b8bcdbf58990d98f6e725e34d Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 17 Jul 2015 16:08:00 +0200 Subject: [PATCH] JSON: Comment on what is a string value --- ucw-json/json.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ucw-json/json.h b/ucw-json/json.h index 799d8884..199b6537 100644 --- a/ucw-json/json.h +++ b/ucw-json/json.h @@ -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); -- 2.39.2