|
@@ -138,6 +138,10 @@ CJSON_PUBLIC(void) cJSON_InitHooks(cJSON_Hooks* hooks);
|
|
/* Memory Management: the caller is always responsible to free the results from all variants of cJSON_Parse (with cJSON_Delete) and cJSON_Print (with stdlib free, cJSON_Hooks.free_fn, or cJSON_free as appropriate). The exception is cJSON_PrintPreallocated, where the caller has full responsibility of the buffer. */
|
|
/* Memory Management: the caller is always responsible to free the results from all variants of cJSON_Parse (with cJSON_Delete) and cJSON_Print (with stdlib free, cJSON_Hooks.free_fn, or cJSON_free as appropriate). The exception is cJSON_PrintPreallocated, where the caller has full responsibility of the buffer. */
|
|
/* Supply a block of JSON, and this returns a cJSON object you can interrogate. */
|
|
/* Supply a block of JSON, and this returns a cJSON object you can interrogate. */
|
|
CJSON_PUBLIC(cJSON *) cJSON_Parse(const char *value);
|
|
CJSON_PUBLIC(cJSON *) cJSON_Parse(const char *value);
|
|
|
|
+/* ParseWithOpts allows you to require (and check) that the JSON is null terminated, and to retrieve the pointer to the final byte parsed. */
|
|
|
|
+/* If you supply a ptr in return_parse_end and parsing fails, then return_parse_end will contain a pointer to the error. If not, then cJSON_GetErrorPtr() does the job. */
|
|
|
|
+CJSON_PUBLIC(cJSON *) cJSON_ParseWithOpts(const char *value, const char **return_parse_end, cJSON_bool require_null_terminated);
|
|
|
|
+
|
|
/* Render a cJSON entity to text for transfer/storage. */
|
|
/* Render a cJSON entity to text for transfer/storage. */
|
|
CJSON_PUBLIC(char *) cJSON_Print(const cJSON *item);
|
|
CJSON_PUBLIC(char *) cJSON_Print(const cJSON *item);
|
|
/* Render a cJSON entity to text for transfer/storage without any formatting. */
|
|
/* Render a cJSON entity to text for transfer/storage without any formatting. */
|
|
@@ -228,10 +232,6 @@ The item->next and ->prev pointers are always zero on return from Duplicate. */
|
|
CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_bool case_sensitive);
|
|
CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_bool case_sensitive);
|
|
|
|
|
|
|
|
|
|
-/* ParseWithOpts allows you to require (and check) that the JSON is null terminated, and to retrieve the pointer to the final byte parsed. */
|
|
|
|
-/* If you supply a ptr in return_parse_end and parsing fails, then return_parse_end will contain a pointer to the error. If not, then cJSON_GetErrorPtr() does the job. */
|
|
|
|
-CJSON_PUBLIC(cJSON *) cJSON_ParseWithOpts(const char *value, const char **return_parse_end, cJSON_bool require_null_terminated);
|
|
|
|
-
|
|
|
|
CJSON_PUBLIC(void) cJSON_Minify(char *json);
|
|
CJSON_PUBLIC(void) cJSON_Minify(char *json);
|
|
|
|
|
|
/* Macros for creating things quickly. */
|
|
/* Macros for creating things quickly. */
|