JSON reader based on events. More...
#include <reader.hpp>
Protected Member Functions | |
| virtual std::streamsize | refillBuffer () |
JSON reader based on events.
Context is used to store mapping options and deserialization buffers.
On found JSON elements, observers will be notified with anch::json::JSONItem .
On parsing error, observers will be notified with anch::json::MappingError .
|
delete |
Forbids Reader default constructor
|
delete |
Forbids Reader copy constructor
| reader | the reader not to copy |
|
delete |
Forbids Reader move constructor
| reader | the reader not to move |
| anch::json::Reader::Reader | ( | std::istream & | is, |
| const anch::json::MappingOptions & | options ) |
Reader constructor
| is | the input stream to read |
| options | the mapping options to use |
| anch::json::MappingError | fail to read input stream |
|
virtual |
Reader destructor
Delete buffers
Observalble anch::json::MappingError cast utility method
anch::json::MappingError
|
noexcept |
Parse input stream
Parsing error while be propagate through anch::json::MappingError 's observers
|
protectedvirtual |
Refill buffer from input stream.
Notify observers with number of read characters.
Reimplemented from anch::json::ReaderContext.
| anch::events::Observable< std::streamsize > & anch::json::Reader::sizeObs | ( | ) |
Observalble streamsize cast utility method
streamsize