Function cJSON_GetErrorPtr

Synopsis

#include <cJSON.h>

const char * cJSON_GetErrorPtr(void)

Description

For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds.

Mentioned in

Source

Lines 94-97 in cJSON.c. Line 176 in cJSON.h.

CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void)
{
    return (const char*) (global_error.json + global_error.position);
}





Add Discussion as Guest

Log in