Commit 00ac1024 authored by Kosta's avatar Kosta

more changes

parent e70494bc
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
using namespace rapidjson; using namespace rapidjson;
using namespace std; using namespace std;
struct MyHandler : public BaseReaderHandler<UTF8<>, MyHandler> { struct MyHandler {
bool Null() { cout << "Null()" << endl; return true; } bool Null() { cout << "Null()" << endl; return true; }
bool Bool(bool b) { cout << "Bool(" << boolalpha << b << ")" << 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 Int(int i) { cout << "Int(" << i << ")" << endl; return true; }
......
...@@ -637,8 +637,10 @@ private: ...@@ -637,8 +637,10 @@ private:
StackStream stackStream(stack_); StackStream stackStream(stack_);
ParseStringToStream<parseFlags, SourceEncoding, TargetEncoding>(s, stackStream); ParseStringToStream<parseFlags, SourceEncoding, TargetEncoding>(s, stackStream);
RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID; RAPIDJSON_PARSE_ERROR_EARLY_RETURN_VOID;
const typename TargetEncoding::Ch* const str = stack_.template Pop<typename TargetEncoding::Ch>(stackStream.length_); success = (isKey
success = (isKey ? handler.Key(str, stackStream.length_ - 1, false) : handler.String(str, stackStream.length_ - 1, false)); ? handler.Key( stack_.template Pop<typename TargetEncoding::Ch>(stackStream.length_), stackStream.length_ - 1, false)
: handler.String(stack_.template Pop<typename TargetEncoding::Ch>(stackStream.length_), stackStream.length_ - 1, false)
);
} }
if(!success) if(!success)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment