Reduced the size of the pretty JSON serializer

This commit is contained in:
Benoit Blanchon
2019-01-23 18:19:24 +01:00
parent 933a66a070
commit 70739f5cfd
14 changed files with 123 additions and 301 deletions

View File

@ -39,13 +39,13 @@ void setup() {
data.add(48.756080);
data.add(2.302038);
serializeJson(root, Serial);
serializeJson(doc, Serial);
// This prints:
// {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]}
Serial.println();
serializeJsonPretty(root, Serial);
serializeJsonPretty(doc, Serial);
// This prints:
// {
// "sensor": "gps",