mirror of
https://github.com/synthetos/g2.git
synced 2026-09-20 17:55:43 +08:00
@@ -141,7 +141,7 @@ static stat_t _json_parser_execute(nvObj_t *nv) {
|
||||
}
|
||||
|
||||
// (*) Note: The JSON / token system is essentially flat, as it was derived from a command-line flat-ASCII approach
|
||||
// If the JSON objects had proper recursive descent handlers that just passed the remaining string (at that level)
|
||||
// If the JSON objects had proper recursive descent handlers that just passed the remaining string (at that level)
|
||||
// off for further processing, we would not need to do this hack. A fix is in the works. For now, this is OK.
|
||||
|
||||
static stat_t _json_parser_kernal(nvObj_t *nv, char *str)
|
||||
@@ -448,7 +448,7 @@ uint16_t json_serialize(nvObj_t *nv, char *out_buf, uint16_t size)
|
||||
*str++ = '"';
|
||||
break;
|
||||
}
|
||||
case (TYPE_BOOLEAN):{ if (nv->value_int) {
|
||||
case (TYPE_BOOLEAN):{ if (!nv->value_int) {
|
||||
strcpy(str, "false");
|
||||
str += 5;
|
||||
} else {
|
||||
@@ -631,7 +631,7 @@ void json_print_response(uint8_t status, const bool only_to_muted /*= false*/)
|
||||
* js_get_ej() - get JSON communications mode
|
||||
* js_set_ej() - set JSON communications mode
|
||||
*
|
||||
* This one is a bit different:
|
||||
* This one is a bit different:
|
||||
* - cs.comm_mode is the setting for the *communications mode* (persistent)
|
||||
* - js.json_mode is the actual current mode
|
||||
*
|
||||
@@ -657,7 +657,7 @@ stat_t js_set_ej(nvObj_t *nv)
|
||||
stat_t js_get_jv(nvObj_t *nv) { return(get_integer(nv, js.json_verbosity)); }
|
||||
stat_t js_set_jv(nvObj_t *nv)
|
||||
{
|
||||
ritorno (set_integer(nv, (uint8_t &)js.json_verbosity, JV_SILENT, JV_MAX_VALUE));
|
||||
ritorno (set_integer(nv, (uint8_t &)js.json_verbosity, JV_SILENT, JV_MAX_VALUE));
|
||||
|
||||
js.echo_json_footer = false;
|
||||
js.echo_json_messages = false;
|
||||
@@ -693,7 +693,7 @@ stat_t json_set_ej(nvObj_t *nv)
|
||||
nv->valuetype = TYPE_NULL;
|
||||
return (STAT_INPUT_EXCEEDS_MAX_VALUE);
|
||||
}
|
||||
|
||||
|
||||
// set json_mode to 0 or 1, but don't change it if comm_mode == 2
|
||||
if (commMode(nv->value) < AUTO_MODE) {
|
||||
js.json_mode = commMode(nv->value);
|
||||
|
||||
Reference in New Issue
Block a user