   
         DynamicJsonBuffer jsonBuffer;
         JsonObject& root = jsonBuffer.createObject();
-        JsonObject& ledToggle = root.createNestedObject("LedToggle");
-        JsonObject& alertTemp = root.createNestedObject("AlertThresholdTemperature");
-        JsonObject& alertBright = root.createNestedObject("AlertThresholdBrightness");
+        JsonObject& ledToggle = root.createNestedObject("ledToggle");
+        JsonObject& alertTemp = root.createNestedObject("alertThresholdTemperature");
+        JsonObject& alertBright = root.createNestedObject("alertThresholdBrightness");
         
         ledToggle["led"] = get_SensorState_led(&sensorState);
         alertTemp["threshold_temperature"] = get_SensorState_thresholdtemperature(&sensorState);

          Serial.println("parseObject() failed");
          return;
        }
        if(root.containsKey("led")) {
		if(((String)root["led"].asString()).equals("ON")) set_SensorState_led(&sensorState,"ON");
		if(((String)root["led"].asString()).equals("OFF")) set_SensorState_led(&sensorState,"OFF");
	} 
	if (root.containsKey("temperaturec")) {			
		set_SensorState_temperaturec(&sensorState,stringToDouble(root["temperaturec"].asString()));
	} 
	if (root.containsKey("brightness")) {
		set_SensorState_brightness(&sensorState,stringToDouble(root["brightness"].asString()));
	}
	if (root.containsKey("threshold_brightness")) {
		set_SensorState_thresholdbrightness(&sensorState,stringToDouble(root["threshold_brightness"].asString()));
	}
	if (root.containsKey("threshold_temperature")) {
		set_SensorState_thresholdtemperature(&sensorState,stringToDouble(root["threshold_temperature"].asString()));
	}
}


        char json[len+1];
        root.prettyPrintTo(json, sizeof(json));
        return json;
}

void parseDatastructureFromJson(String json) {
