Set will not accept precision
Created by: spiked3
Simple sketch; void setup() { Serial.begin(115200); StaticJsonBuffer<256> buffer; JsonObject& t = buffer.createObject(); t["T"] = "Testing"; t["Txt"] = "123456"; t["aFloat"].set(12.345678,5); JsonArray& data = t.createNestedArray("data"); data.add(48.756080, 6); // 6 is the number of decimals to print data.add(2.302038, 6); // if not specified, 2 digits are printed t.printTo(Serial); Serial.println(); }
t["aFloat"].set(12.345678,5); fails, comment that line out and it runs as expected error received is JsonObjectSubscript.hpp:template argument deduction\substitution failed vmTest.ino:candidate expects 1 argument, 2 provided