summaryrefslogtreecommitdiff
path: root/json_tokener.h
diff options
context:
space:
mode:
authorJehiah Czebotar <jehiah@gmail.com>2010-12-08 03:52:07 +0000
committerJehiah Czebotar <jehiah@gmail.com>2010-12-08 03:52:07 +0000
commita503ee8217a9912f3c58acae33cf3d1d840dab6c (patch)
tree75f1cf7326373e053a080ef9416bdbca6df69bec /json_tokener.h
parent5644272f038417ad6bf4851a05e0273b9c630275 (diff)
add json_tokener_parse_verbose, and return NULL on parser errors
git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@62 327403b1-1117-474d-bef2-5cb71233fd97
Diffstat (limited to 'json_tokener.h')
-rw-r--r--json_tokener.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/json_tokener.h b/json_tokener.h
index 7d40b40..162a152 100644
--- a/json_tokener.h
+++ b/json_tokener.h
@@ -76,7 +76,7 @@ struct json_tokener
char *str;
struct printbuf *pb;
int depth, is_double, st_pos, char_offset;
- ptrdiff_t err;
+ enum json_tokener_error err;
unsigned int ucs_char;
char quote_char;
struct json_tokener_srec stack[JSON_TOKENER_MAX_DEPTH];
@@ -88,6 +88,7 @@ extern struct json_tokener* json_tokener_new(void);
extern void json_tokener_free(struct json_tokener *tok);
extern void json_tokener_reset(struct json_tokener *tok);
extern struct json_object* json_tokener_parse(const char *str);
+extern struct json_object* json_tokener_parse_verbose(const char *str, enum json_tokener_error *error);
extern struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
const char *str, int len);