ezEngine  Milestone 9
ezJSONParser Class Referenceabstract

A low level JSON parser that can incrementally parse the structure of a JSON document. More...

#include <JSONParser.h>

Inheritance diagram for ezJSONParser:

Public Member Functions

 ezJSONParser ()
 Constructor.
 
void SetLogInterface (ezLogInterface *pLog)
 Allows to specify an ezLogInterface through which errors and warnings are reported.
 

Protected Member Functions

void SetInputStream (ezStreamReader &stream, ezUInt32 uiFirstLineOffset=0)
 Resets the parser to the start state and configures it to read from the given stream.
 
bool ContinueParsing ()
 Does one parsing step. More...
 
void ParseAll ()
 Calls ContinueParsing() in a loop until that returns false.
 
void SkipObject ()
 Skips the rest of the currently open object. No OnEndArray() and OnEndObject() calls will be done for this object, cleanup must be done manually.
 
void SkipArray ()
 Skips the rest of the currently open array. No OnEndArray() and OnEndObject() calls will be done for this object, cleanup must be done manually.
 
void ParsingError (const char *szMessage, bool bFatal)
 Outputs that a parsing error was detected (via OnParsingError) and stops further parsing, if bFatal is set to true.
 

Protected Attributes

ezLogInterfacem_pLogInterface
 

Detailed Description

A low level JSON parser that can incrementally parse the structure of a JSON document.

The document structure is returned through virtual functions that need to be overridden.

Member Function Documentation

◆ ContinueParsing()

bool ezJSONParser::ContinueParsing ( )
protected

Does one parsing step.

While this function returns true, the document has not been parsed completely. This function may call any of the OnSomething functions through which the structure of the document is obtained. This function calls at most one such callback, but there is no guarantee that it calls any at all, it might just advance its internal state.


The documentation for this class was generated from the following files: