20f4a5b927fa753ae773166d6e52b7a388b2f4c4 kent Wed Dec 18 15:01:32 2013 -0800 Fixing value return types for jsonBooleanVal and jsonDoubleVal. diff --git src/inc/jsonParse.h src/inc/jsonParse.h index f779abb..e356ed9 100644 --- src/inc/jsonParse.h +++ src/inc/jsonParse.h @@ -90,34 +90,34 @@ void jsonPrintToFile(struct jsonElement *root, char *name, FILE *f, int indentPer); /* Print out JSON object and all children nicely indented to f as JSON objects. * Name may be NULL. Implemented via jsonPrintOneStart/jsonPrintOneEnd. */ /** Routines that check json type and return corresponding value. **/ struct slRef *jsonListVal(struct jsonElement *ele, char *name); /* Enforce element is type jsonList. Return list value */ struct hash *jsonObjectVal(struct jsonElement *ele, char *name); /* Enforce object is type jsonObject. Return object hash */ long jsonNumberVal(struct jsonElement *ele, char *name); /* Enforce element is type jsonNumber and return value. */ -long jsonDoubleVal(struct jsonElement *ele, char *name); +double jsonDoubleVal(struct jsonElement *ele, char *name); /* Enforce element is type jsonDouble and return value. */ -long jsonBooleanVal(struct jsonElement *ele, char *name); +boolean jsonBooleanVal(struct jsonElement *ele, char *name); /* Enforce element is type jsonBoolean and return value. */ char *jsonStringVal(struct jsonElement *ele, char *eleName); /* Enforce element is type jsonString and return value. */ /** Routines that help work with json objects (bracket enclosed key/val pairs **/ struct jsonElement *jsonFindNamedField(struct jsonElement *object, char *objectName, char *field); /* Find named field of object or return NULL if not found. Abort if object * is not actually an object. */ struct jsonElement *jsonMustFindNamedField(struct jsonElement *object, char *objectName, char *field); /* Find named field of object or die trying. */