for aJSON, to avoid mem leak, don't do this: Serial.println(aJson.print(root)); - instead do this: char* json = aJson.print(root); Serial.println(json); free(json);