We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
char QC_JSON[1024] = <normalJson>; DynamicJsonBuffer jsonBuffer; JsonObject& root = jsonBuffer.parseObject(QC_JSON); if(root.success()) { Serial.print("QC:");Serial.println(sizeof(QC_JSON)); int lab = root["lab"]; Serial.print("Json:");Serial.println(lab); memset(QC_JSON, 0, sizeof(QC_JSON)); root.prettyPrintTo(Serial); root.add("lab",int(3)); root.printTo(QC_JSON,sizeof(QC_JSON)); String buffer = String(QC_JSON); Serial.println(buffer); }
now at this line
memset(QC_JSON, 0, sizeof(QC_JSON)); root.prettyPrintTo(Serial);
output
{ "": 2, "": "", "": "", "": "" }
all the key values are gone why is this happening ?? Is root object address point to char buffer ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
now at this line
output
all the key values are gone why is this happening ?? Is root object address point to char buffer ?
The text was updated successfully, but these errors were encountered: