#include <ArduinoJson.h>
String json_str = "{\"DOmdks42skdjqQsia1Cha4\":{\"email\":\"test@test.com\",\"name\":\"\\\"테스트용1\\\"\",\"uid\":\"tttttttt\"},\"I1R2Wr0QBgSecD3hahOvjQ3WrCy2\":{\"email\":\"test@test.com\",\"name\":\"tset\",\"uid\":\"ttttttt\"}}";
JsonObject obj;
StaticJsonDocument<200> doc;
void setup() {
DeserializationError error = deserializeJson(doc, json_str); //역직렬화 시도후 에러시 기록
if (error) { //파싱 실패시 에러메세지 출력
Serial.print(F("deserializeJson() failed: "));
Serial.println(error.f_str());
return;
}
Serial.begin(9600);
}
void loop() {
//Serial.println(json_str);
String value_root = doc["DOmdks42skdjqQsia1Cha4"];
Serial.println(value_root);
String value_email = doc["DOmdks42skdjqQsia1Cha4"]["email"];
Serial.println(value_email);
delay(1000);
}