Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Reference program for JSON parser's size
void setup() {
Serial.begin(9600);
char json[] =
"{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}";
const char* sensor = "gps";
long time = 1351824120;
double latitude = 48.756080;
double longitude = 2.302038;
Serial.println(sensor);
Serial.println(json);
Serial.println(time);
Serial.println(latitude, 6);
Serial.println(longitude, 6);
}
void loop() {
// not used in this example
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment