diff options
Diffstat (limited to 'json.h')
| -rw-r--r-- | json.h | 29 |
1 files changed, 0 insertions, 29 deletions
@@ -162,32 +162,7 @@ json_head(json_node * parent) } } - -/* - * Decodes a JSON-encoded string literal - * (If you're interested in the decoding JSON in general, see json_decode). - * If strict is true, string must be double-quoted, - * as is required by the JSON RFC. - * Otherwise, the string may be single- or double-quoted. - * Also, no whitespace skipping is done, so the caller should only - * call this function when it expects **sp to be either " or ' - * - * On success, returns the decoded string and passes that string's length - * through *length (which must not be NULL). On failure (parse error), - * returns NULL and leaves *length untouched. - */ char *json_decode_string(const char **sp, size_t *length, bool strict); - -/* - * Encodes a string literal JSON-style using the given quote character, - * only escaping characters when necessary - * (If you're interested in encoding JSON in general, see json_encode). - * Note that using anything but '"' as the quote character will result in - * invalid JSON. - * - * Returns NULL if input is invalid UTF-8 or if an invalid quote character - * (such as backslash) is given. - */ char *json_encode_string(const char *str, size_t length, char quote, bool escape_unicode); /* Add child to parent, putting it at the end. */ @@ -199,10 +174,6 @@ void json_remove(json_node * node); /* Update the value of a node, preserving position and key information. */ void json_replace_value(json_node * node, json_node * replacement); -/* Note that the factory functions and get/set functions do not validate input. - * However, json_encode validates node contents to avoid producing - * invalid JSON. */ - /* Node factory functions */ json_node *json_mknode(json_type type); json_node *json_mkbool(bool v_bool); |
