diff --git a/src/console.cpp b/src/console.cpp index e74ecded8..cc8be210c 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -530,7 +530,14 @@ static void setup_commands(std::shared_ptr & commands) { if (return_code == CommandRet::OK && json.size()) { if (json.containsKey("api_data")) { JsonVariant data = json["api_data"]; - shell.println(data.as()); + if (data.is()) { + shell.printfln("%d", data.as()); + } else if (data.is()) { + char s[10]; + shell.println(Helpers::render_value(s, data.as(), 1)); + } else { + shell.println(data.as()); + } return; } serializeJsonPretty(doc, shell);