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:
Diffstat (limited to 'example/simplereader/simplereader.cpp')
-rw-r--r--example/simplereader/simplereader.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/example/simplereader/simplereader.cpp b/example/simplereader/simplereader.cpp
index ed2bd3bf..9914253d 100644
--- a/example/simplereader/simplereader.cpp
+++ b/example/simplereader/simplereader.cpp
@@ -5,21 +5,21 @@ using namespace rapidjson;
using namespace std;
struct MyHandler {
- bool Null() { cout << "Null()" << endl; return true; }
- bool Bool(bool b) { cout << "Bool(" << boolalpha << b << ")" << endl; return true; }
- bool Int(int i) { cout << "Int(" << i << ")" << endl; return true; }
- bool Uint(unsigned u) { cout << "Uint(" << u << ")" << endl; return true; }
- bool Int64(int64_t i) { cout << "Int64(" << i << ")" << endl; return true; }
- bool Uint64(uint64_t u) { cout << "Uint64(" << u << ")" << endl; return true; }
- bool Double(double d) { cout << "Double(" << d << ")" << endl; return true; }
+ bool Null() { cout << "Null()" << endl; return true; }
+ bool Bool(bool b) { cout << "Bool(" << boolalpha << b << ")" << endl; return true; }
+ bool Int(int i) { cout << "Int(" << i << ")" << endl; return true; }
+ bool Uint(unsigned u) { cout << "Uint(" << u << ")" << endl; return true; }
+ bool Int64(int64_t i) { cout << "Int64(" << i << ")" << endl; return true; }
+ bool Uint64(uint64_t u) { cout << "Uint64(" << u << ")" << endl; return true; }
+ bool Double(double d) { cout << "Double(" << d << ")" << endl; return true; }
bool String(const char* str, SizeType length, bool copy) {
- cout << "String(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl;
- return true;
- }
- bool StartObject() { cout << "StartObject()" << endl; return true; }
- bool EndObject(SizeType memberCount) { cout << "EndObject(" << memberCount << ")" << endl; return true; }
- bool StartArray() { cout << "StartArray()" << endl; return true; }
- bool EndArray(SizeType elementCount) { cout << "EndArray(" << elementCount << ")" << endl; return true; }
+ cout << "String(" << str << ", " << length << ", " << boolalpha << copy << ")" << endl;
+ return true;
+ }
+ bool StartObject() { cout << "StartObject()" << endl; return true; }
+ bool EndObject(SizeType memberCount) { cout << "EndObject(" << memberCount << ")" << endl; return true; }
+ bool StartArray() { cout << "StartArray()" << endl; return true; }
+ bool EndArray(SizeType elementCount) { cout << "EndArray(" << elementCount << ")" << endl; return true; }
};
int main() {
@@ -28,7 +28,7 @@ int main() {
MyHandler handler;
Reader reader;
StringStream ss(json);
- reader.Parse(ss, handler);
+ reader.Parse(ss, handler);
- return 0;
+ return 0;
}