![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <json_parsing.h>
Public Member Functions | |
template<typename... Args> | |
StreamingJsonParsingContext (Args &&...args) | |
template<typename... Args> | |
void | init (Args &&...args) |
void | init (ML::Parse_Context &context) |
template<typename Fn > | |
void | forEachMember (const Fn &fn) |
virtual void | forEachMember (const std::function< void()> &fn) |
template<typename Fn > | |
void | forEachElement (const Fn &fn) |
virtual void | forEachElement (const std::function< void()> &fn) |
void | skip () |
virtual int | expectInt () |
virtual float | expectFloat () |
virtual double | expectDouble () |
virtual bool | expectBool () |
virtual void | expectNull () |
virtual bool | matchUnsignedLongLong (unsigned long long &val) |
virtual bool | matchLongLong (long long &val) |
virtual std::string | expectStringAscii () |
virtual Utf8String | expectStringUtf8 () |
virtual bool | isObject () const |
virtual bool | isString () const |
virtual bool | isArray () const |
virtual bool | isBool () const |
virtual bool | isNumber () const |
virtual bool | isNull () const |
virtual void | exception (const std::string &message) |
virtual Json::Value | expectJson () |
Public Attributes | |
ML::Parse_Context * | context |
std::unique_ptr < ML::Parse_Context > | ownedContext |
This object allows you to parse a stream (string, file, std::istream) containing JSON data into an object without performing an intermediate translation into a structured JSON format. This tends to be a lot faster as far fewer memory allocations are required.
Definition at line 184 of file json_parsing.h.
virtual void Datacratic::StreamingJsonParsingContext::exception | ( | const std::string & | message | ) | [inline, virtual] |
Handler for when we get an undexpected field.
Implements Datacratic::JsonParsingContext.
Definition at line 382 of file json_parsing.h.