added Print function call for pre-allocated buffer

This commit is contained in:
Kyle Chisholm
2016-11-25 04:53:22 -05:00
committed by Max Bruckner
parent d0a9f46888
commit 23dafa4739
2 changed files with 12 additions and 0 deletions

View File

@ -83,6 +83,8 @@ extern char *cJSON_Print(const cJSON *item);
extern char *cJSON_PrintUnformatted(const cJSON *item);
/* Render a cJSON entity to text using a buffered strategy. prebuffer is a guess at the final size. guessing well reduces reallocation. fmt=0 gives unformatted, =1 gives formatted */
extern char *cJSON_PrintBuffered(const cJSON *item, int prebuffer, int fmt);
/* Render a cJSON entity to text using a buffer already allocated in memory with length buf_len */
extern int cJSON_PrintMallocedBuffer(cJSON *item, char *buf, const int len, int fmt);
/* Delete a cJSON entity and all subentities. */
extern void cJSON_Delete(cJSON *c);