mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-12-22 23:12:36 +01:00
Save some bytes on the wifi scanned result payload format
This commit is contained in:
@@ -630,15 +630,15 @@ String WifiConnector::buildPaginatedWiFiJSON(WiFiNetwork networks[], int totalFo
|
||||
|
||||
for (int i = startIdx; i < endIdx; i++) {
|
||||
JSONVar obj;
|
||||
obj["ssid"] = networks[i].ssid;
|
||||
obj["rssi"] = networks[i].rssi;
|
||||
obj["open"] = networks[i].open;
|
||||
obj["s"] = networks[i].ssid;
|
||||
obj["r"] = networks[i].rssi;
|
||||
obj["o"] = networks[i].open ? 1 : 0;
|
||||
jsonArray[i - startIdx] = obj;
|
||||
}
|
||||
|
||||
jsonRoot["wifi"] = jsonArray;
|
||||
jsonRoot["page"] = page;
|
||||
jsonRoot["totalPage"] = totalPages;
|
||||
jsonRoot["tpage"] = totalPages;
|
||||
jsonRoot["found"] = totalFound;
|
||||
|
||||
String jsonString = JSON.stringify(jsonRoot);
|
||||
|
||||
Reference in New Issue
Block a user