From 7802e351e76809f20bd9442db8e88bf6bbf4d9ee Mon Sep 17 00:00:00 2001 From: Rob Giseburt Date: Fri, 27 Oct 2017 13:52:34 -0500 Subject: [PATCH] Attempted fix for #298 (reading nested JSON fail) --- g2core/json_parser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/g2core/json_parser.cpp b/g2core/json_parser.cpp index 3c48d084..531df60a 100644 --- a/g2core/json_parser.cpp +++ b/g2core/json_parser.cpp @@ -116,7 +116,9 @@ void json_parse_for_exec(char *str, bool execute) static stat_t _json_parser_execute(nvObj_t *nv) { do { - if (nv->valuetype == TYPE_NULL) { // means GET the value + if (nv->valuetype == TYPE_PARENT) { + // anything? + } else if (nv->valuetype == TYPE_NULL) { // means GET the value ritorno(nv_get(nv)); // ritorno returns w/status on any errors if (nv->valuetype == TYPE_PARENT) { // This will be true if you read a group. Exit now return (STAT_OK);