3#include <Foundation/Basics.h>
4#include <Foundation/IO/JSONParser.h>
5#include <Foundation/Types/Variant.h>
79 bool m_bParsingError =
false;
T & PeekBack()
Returns the last element of the array.
Definition ArrayBase_inl.h:388
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.
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 OnReadValueNULL()=0
Called whenever a new value is read.
virtual void OnReadValue(plStringView sValue)=0
Called whenever a new value is read.
This JSON reader will read an entire JSON document into a hierarchical structure of plVariants.
Definition JSONReader.h:14
ElementType GetTopLevelElementType() const
Returns whether the top level element is an array or an object.
Definition JSONReader.h:36
const plVariantArray & GetTopLevelArray() const
Returns the top-level array of the JSON document.
Definition JSONReader.h:33
ElementType
Definition JSONReader.h:17
const plVariantDictionary & GetTopLevelObject() const
Returns the top-level object of the JSON document.
Definition JSONReader.h:30
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
Definition JSONReader.h:70
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54