mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 12:36:52 +03:00
Remove excessive whitespaces and newlines in json (#1904)
* . * . * . * . * . * remove newlines in json as it is not needed * . Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
@@ -356,20 +356,18 @@ esp_err_t sysinfo_handler(httpd_req_t *req)
|
||||
const char *hostname;
|
||||
ESP_ERROR_CHECK(tcpip_adapter_get_hostname(TCPIP_ADAPTER_IF_STA, &hostname));
|
||||
|
||||
zw = "[\
|
||||
{\
|
||||
\"firmware\" : \"" + gitversion + "\",\
|
||||
\"buildtime\" : \"" + buildtime + "\",\
|
||||
\"gitbranch\" : \"" + gitbranch + "\",\
|
||||
\"gittag\" : \"" + gittag + "\",\
|
||||
\"gitrevision\" : \"" + gitrevision + "\",\
|
||||
\"html\" : \"" + htmlversion + "\",\
|
||||
\"cputemp\" : \"" + cputemp + "\",\
|
||||
\"hostname\" : \"" + hostname + "\",\
|
||||
\"IPv4\" : \"" + ip4addr_ntoa(&ip_info.ip) + "\",\
|
||||
\"freeHeapMem\" : \"" + freeheapmem + "\"\
|
||||
}\
|
||||
]";
|
||||
zw = string("[{") +
|
||||
"\"firmware\": \"" + gitversion + "\"," +
|
||||
"\"buildtime\": \"" + buildtime + "\"," +
|
||||
"\"gitbranch\": \"" + gitbranch + "\"," +
|
||||
"\"gittag\": \"" + gittag + "\"," +
|
||||
"\"gitrevision\": \"" + gitrevision + "\"," +
|
||||
"\"html\": \"" + htmlversion + "\"," +
|
||||
"\"cputemp\": \"" + cputemp + "\"," +
|
||||
"\"hostname\": \"" + hostname + "\"," +
|
||||
"\"IPv4\": \"" + ip4addr_ntoa(&ip_info.ip) + "\"," +
|
||||
"\"freeHeapMem\": \"" + freeheapmem + "\"" +
|
||||
"}]";
|
||||
|
||||
resp_str = zw.c_str();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user