Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Yip <miloyip@gmail.com>2014-06-29 11:03:38 +0400
committerMilo Yip <miloyip@gmail.com>2014-06-29 11:03:38 +0400
commit1d14748bc9e180ef6a94bd137e025e7617354f99 (patch)
treeb2a795a6510eef2d7faa03a6814be14ed5acc478 /example
parent6f306755d5b7503d2fb6fb88aecbcc5534babdf7 (diff)
Added overloaded functions for default parseFlags
Can write d.Parse(...) instead of d.Parse<0>(...) Hope to reduce strangeness and confusion for beginner.
Diffstat (limited to 'example')
-rw-r--r--example/condense/condense.cpp2
-rw-r--r--example/simpledom/simpledom.cpp2
-rw-r--r--example/tutorial/tutorial.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/example/condense/condense.cpp b/example/condense/condense.cpp
index 8f1da83f..93da389c 100644
--- a/example/condense/condense.cpp
+++ b/example/condense/condense.cpp
@@ -22,7 +22,7 @@ int main(int, char*[]) {
Writer<FileWriteStream> writer(os);
// JSON reader parse from the input stream and let writer generate the output.
- if (!reader.Parse<0>(is, writer)) {
+ if (!reader.Parse(is, writer)) {
fprintf(stderr, "\nError(%u): %s\n", (unsigned)reader.GetErrorOffset(), reader.GetParseError());
return 1;
}
diff --git a/example/simpledom/simpledom.cpp b/example/simpledom/simpledom.cpp
index de2dc660..a2c9121f 100644
--- a/example/simpledom/simpledom.cpp
+++ b/example/simpledom/simpledom.cpp
@@ -12,7 +12,7 @@ int main() {
// 1. Parse a JSON string into DOM.
const char* json = "{\"project\":\"rapidjson\",\"stars\":10}";
Document d;
- d.Parse<0>(json);
+ d.Parse(json);
// 2. Modify it by DOM.
Value& s = d["stars"];
diff --git a/example/tutorial/tutorial.cpp b/example/tutorial/tutorial.cpp
index a765e017..592543ea 100644
--- a/example/tutorial/tutorial.cpp
+++ b/example/tutorial/tutorial.cpp
@@ -19,14 +19,14 @@ int main(int, char*[]) {
#if 0
// "normal" parsing, decode strings to new buffers. Can use other input stream via ParseStream().
- if (document.Parse<0>(json).HasParseError())
+ if (document.Parse(json).HasParseError())
return 1;
#else
// In-situ parsing, decode strings directly in the source string. Source must be string.
{
char buffer[sizeof(json)];
memcpy(buffer, json, sizeof(json));
- if (document.ParseInsitu<0>(buffer).HasParseError())
+ if (document.ParseInsitu(buffer).HasParseError())
return 1;
}
#endif