3#include <Foundation/Basics.h>
4#include <Foundation/Containers/HybridArray.h>
5#include <Foundation/IO/Stream.h>
25 void SetInputStream(
plStreamReader& stream, plUInt32 uiFirstLineOffset = 0);
33 bool ContinueParsing();
114 JSONState() { m_State = NotStarted; }
120 void SkipWhitespace();
126 void ContinueObject();
127 void ContinueArray();
128 void ContinueVariable();
129 void ContinueValue();
130 void ContinueSeparator();
132 bool ReadCharacter(
bool bSkipComments);
135 void SkipStack(State s);
138 plUInt8 m_uiNextByte;
139 plUInt32 m_uiCurLine;
140 plUInt32 m_uiCurColumn;
146 bool m_bSkippingMode;
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
A low level JSON parser that can incrementally parse the structure of a JSON document.
Definition JSONParser.h:13
virtual void OnEndArray()=0
Called when the end of an array is encountered.
virtual void OnBeginArray()=0
Called when a new array is encountered.
void SetLogInterface(plLogInterface *pLog)
Allows to specify an plLogInterface through which errors and warnings are reported.
Definition JSONParser.h:21
virtual void OnReadValue(double fValue)=0
Called whenever a new value is read.
virtual void OnParsingError(plStringView sMessage, bool bFatal, plUInt32 uiLine, plUInt32 uiColumn)
Called when something unexpected is encountered in the JSON document.
Definition JSONParser.h:98
virtual bool OnVariable(plStringView sVarName)=0
Called whenever a new variable is encountered. The variable name is passed along. At this point the t...
virtual void OnBeginObject()=0
Called when a new object is encountered.
virtual void OnEndObject()=0
Called when the end of an object is encountered.
virtual void OnReadValue(bool bValue)=0
Called whenever a new value is read.
virtual void OnReadValueNULL()=0
Called whenever a new value is read.
virtual void OnReadValue(plStringView sValue)=0
Called whenever a new value is read.
Base class for all logging classes.
Definition Log.h:77
Interface for binary in (read) streams.
Definition Stream.h:22
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34