I am using the Arduino_JSON.h library to decode an incoming mqtt json string. The incoming data looks like: {"shutdown":0,"extra":0,"geolat":33.11111,"geolong":-84.11111} and I use the code below to extract the individual variables and their values:
JSONVar myObject = JSON.parse(commandresponse.c_str());
commandshutdown = myObject["shutdown"];
commandgeofence = myObject["extra"];
double latitudefromweb = myObject["geolat"];
double longitudefromweb = myObject["geolong"];
But I print the latitude and see it has been rounded significantly by this code. I read 33.11
how can I avoid this rounding?