summaryrefslogtreecommitdiff
path: root/json.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-08-25 13:03:45 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-08-25 13:03:45 +0000
commit9be0d591715b8d48ae59addaa4cdea25f35921b0 (patch)
tree0ab33c097e0ad618092890f4d857117a6644b906 /json.h
parent536093cb652815046794e73977622236739de4b6 (diff)
downloadgpsd-9be0d591715b8d48ae59addaa4cdea25f35921b0.tar.gz
Add character type to JSON parser.
Make gpsctl work with new protocol (only the device ID function is tested at this point).
Diffstat (limited to 'json.h')
-rw-r--r--json.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/json.h b/json.h
index e6505d69..e3d1243c 100644
--- a/json.h
+++ b/json.h
@@ -4,7 +4,7 @@
#include <stdbool.h>
#include <ctype.h>
-typedef enum {integer, real, string, boolean,
+typedef enum {integer, real, string, boolean, character,
object, structobject, array, check} json_type;
#define nullbool -1 /* not true, not false */
@@ -34,6 +34,7 @@ struct json_attr_t {
double *real;
char *string;
bool *boolean;
+ char *character;
struct json_array_t array;
size_t offset;
} addr;
@@ -41,6 +42,7 @@ struct json_attr_t {
int integer;
double real;
bool boolean;
+ char character;
char *check;
} dflt;
size_t len;