remove join method as everything is handled via activate, remove commented code

This commit is contained in:
2018-11-08 15:46:46 +01:00
parent a8e0d9037e
commit b63b75b47f
3 changed files with 2 additions and 25 deletions

View File

@@ -16,10 +16,8 @@ struct JsonStruct {
virtual void fromJsonObject(JsonObject& json);
virtual int verifyJsonObject(JsonObject& json){
return json.success();
//&& json.containsKey(JSON_DOMAIN)
};
String toJsonString(){
//StaticJsonBuffer<200> StringjsonBuffer;
DynamicJsonBuffer jsonBuffer(JSON_ARRAY_SIZE(300));
JsonObject& root = jsonBuffer.createObject();
mapJsonObject(root);
@@ -44,7 +42,6 @@ struct JsonStruct {
// Map a json object to this struct.
// Parse a json string and map parsed object
void fromJsonString(String& str){
//StaticJsonBuffer<200> jsonBuffer;
DynamicJsonBuffer jsonBuffer(JSON_ARRAY_SIZE(300));
JsonObject& json = jsonBuffer.parseObject(str);
valid = verifyJsonObject(json);
@@ -56,13 +53,6 @@ struct JsonStruct {
void fromFile(const char* path) {
File configFile = SPIFFS.open(path, "r");
String cfgFileStr = configFile.readString();
// Allocate a buffer to store contents of the file.
//size_t size = configFile.size();
//std::unique_ptr<char[]> buf(new char[size]);
//configFile.readBytes(buf.get(), size);
//StaticJsonBuffer<1024> jsonBuffer;
//JsonObject& json = jsonBuffer.parseObject(buf.get());
DynamicJsonBuffer jsonBuffer;
JsonObject& json = jsonBuffer.parseObject(cfgFileStr);