diff --git a/example/simpledom/simpledom.cpp b/example/simpledom/simpledom.cpp index 56be032..de2dc66 100644 --- a/example/simpledom/simpledom.cpp +++ b/example/simpledom/simpledom.cpp @@ -15,7 +15,8 @@ int main() { d.Parse<0>(json); // 2. Modify it by DOM. - d["stars"].SetInt(d["stars"].GetInt() + 1); + Value& s = d["stars"]; + s.SetInt(s.GetInt() + 1); // 3. Stringify the DOM StringBuffer buffer; diff --git a/readme.md b/readme.md index 00c83af..e07321b 100644 --- a/readme.md +++ b/readme.md @@ -68,7 +68,8 @@ int main() { d.Parse<0>(json); // 2. Modify it by DOM. - d["stars"].SetInt(d["stars"].GetInt() + 1); + Value& s = d["stars"]; + s.SetInt(s.GetInt() + 1); // 3. Stringify the DOM StringBuffer buffer;