842 operator bool()
const;
SceSize size
struct size(variable size)
Definition: debug.h:0
Class for JSON arrays.
Definition: json.h:156
Class for iterating over Array members.
Definition: json.h:162
Utility Data Structure to pass on initialisation parameters.
Definition: json.h:105
Utility class for initialising and terminating the library.
Definition: json.h:130
Base class for reimplementation of memory allocation.
Definition: json.h:73
Class for JSON objects.
Definition: json.h:865
Key-Value Pair of JSON Object property.
Definition: json.h:871
Class for iterating over Object members.
Definition: json.h:885
Static Class for parsing.
Definition: json.h:1015
Class for JSON strings.
Definition: json.h:286
Class for value of JSON property.
Definition: json.h:508
bool compare(const String &str) const
Compares the string to str.
iterator & operator++(int adv)
Increment the iterator.
Pair * operator->() const
Access the Pair the iterator is pointing to.
bool operator==(iterator iter) const
Compare to another iterator.
SceSize rfind(const String &str, SceSize pos) const
Searches the string for the last instance of a sequence.
Array * referArray()
Returns a pointer to the array.
bool operator==(const char *s) const
Compares the string to s.
SceInt64 integer
Definition: json.h:850
void advance(SceSize adv)
Advance the iterator by adv.
void erase(const String &str)
Remove the Pair with the key str.
SceBool boolean
Definition: json.h:849
static int parse(Value &val, const char *buf, SceSize size)
Parses a string buffer.
Value & operator=(const Value &value)
Assignment Operator.
ValueType type
The type of the value.
Definition: json.h:858
const Value & operator[](SceSize pos) const
Returns constant reference of the Value at pos.
void swap(Value &val)
Swaps the value with another Value.
Value * referValue(const String &key)
Returns a pointer to the value.
bool empty() const
Returns whether the string is empty or not.
void set(SceInt64 value)
Set the value to a long integer(64 bits)
Value const &(* NullAccessCallback)(ValueType type, const Value *parent, void *userData)
Callback for NullValue access.
Definition: json.h:529
void * implData
Pointer to internal implementation data.
Definition: json.h:500
iterator begin() const
Returns an iterator to the first child element.
void * implData
Pointer to internal implementation data.
Definition: json.h:938
iterator end() const
Get an iterator pointing to after the end of the Array.
SceSize count() const
Returns number of children.
void * implData
Pointer to internal implementation data.
Definition: json.h:279
char unused[4]
Unused.
Definition: json.h:878
Pair(const String &name, const Value &value)
Pair & operator*() const
Dereference the iterator.
void pop_back()
Removes the last child value.
int(* SerializeCallback)(String &str, void *userData)
Callback for serialization.
Definition: json.h:517
iterator insert(const iterator &pos, const Value &val)
Insert a Value at pos.
String key
Name assigned to the property.
Definition: json.h:877
char unused[4]
Unused.
Definition: json.h:857
SceDouble real
Definition: json.h:852
void * implData
Pointer to internal implementation data.
Definition: json.h:204
SceSize rfind(char c, SceSize pos) const
Searches the string for the last instance of a sequence.
iterator end() const
Returns an iterator to after the last child element.
iterator insert(const Pair &p)
Inserts a pair into the Object.
Value & operator*() const
Dereference the iterator.
String & operator+=(const char *s)
Appends s to the string.
Object(const Object &obj)
Value(const Value &value)
iterator find(const String &key)
Finds a Pair with a matching key.
String * string
Definition: json.h:853
int(* ParseCallback)(char &ch, void *userData)
Callback for outputing a character to parse.
Definition: json.h:1045
void * userData
User defined data sent to overriden MemAllocator functions.
Definition: json.h:115
ValueType
Strongly typed Enumerator of different types of Values.
Definition: json.h:57
SceUInt64 uinteger
Definition: json.h:851
SceSize size() const
Get the size of the array.
Value(const String &value)
SceSize find(const char *s, SceSize pos, SceSize n) const
Searches the string for the first instance of a sequence.
Value & back() const
Returns a reference to the last element in the Array.
Array * array
Definition: json.h:854
iterator erase(const iterator &pos)
Erase the Value at pos.
void clear()
Clears the value by setting to null.
Value * parent
Pointer to the value's parent.
Definition: json.h:845
Value(const Object &value)
void set(ValueType type)
Set the type.
iterator(const iterator &iter)
iterator begin() const
Get an iterator pointing to the start of the Array.
bool operator!=(iterator iter) const
Compare to another iterator.
String & append(const String &str)
Append string str.
String * referString()
Returns a pointer to the string.
const Value & operator[](const char *key) const
Returns constant reference of the Value of key.
bool operator==(const String &str) const
Compares the string to str.
Object * referObject()
Returns a pointer to the object.
String(const String &str)
const SceBool & getBoolean() const
Returns a constant reference to the value.
SceSize find(char c, SceSize pos) const
Searches the string for the first instance of a sequence.
int setNullAccessCallback(NullAccessCallback cb, void *userData)
Set the Value's NullAccessCallback.
Array & operator=(const Array &arr)
Assignment Operator.
SceSize find(const String &str, SceSize pos) const
Searches the string for the first instance of a sequence.
void set(const String &value)
Set the value to a String.
void set(SceBool value)
Set the value to a boolean.
static const SceSize npos
Definition: json.h:293
String & append(const char *s, SceSize pos)
Append string s to position pos.
SceInt64 * referInteger()
Returns a pointer to the value.
String substr(SceSize pos=0, SceSize len=npos) const
Returns a newly constructed string object with its value initialized to a copy of a substring of this...
Value & operator[](const String &str)
Searches for a pair with a key matching str.
NullAccessCallback cb
The value's NullAccessCallback.
Definition: json.h:846
Value * operator->() const
Access the Value being pointed to.
MemAllocator * allocator
Pointer to a MemAllocator object for internal memory allocations.
Definition: json.h:111
void push_back(const Value &val)
Adds val to the end of the Array.
void advance(SceSize adv)
Advance the iterator.
void operator++()
Increment the iterator.
const String & getString() const
Returns a constant reference to the string.
void set(const Object &value)
Set the value to an Object.
void clear()
Empty the object.
const Object & getObject() const
Returns a constant reference to the object.
void * implData
Pointer to internal implementation data.
Definition: json.h:1008
int serialize(String &str, SerializeCallback cb, void *userData)
Serializes the values into a string in JSON format.
int terminate()
Terminate the library.
SceSize size() const
Returns the length of the String in bytes.
static int parse(Value &val, const char *path)
Parse a JSON file.
virtual void * allocateMemory(SceSize size, void *userData)=0
Virtual Function for memory allocation.
String & operator=(const String &str)
Assignment Operator.
virtual void freeMemory(void *ptr, void *userData)=0
Virtual Function for memory deallocation.
Object & operator=(const Object &obj)
Assignment Operator.
Value(const Array &value)
int initialize(const InitParameter *initParams)
Initialise the library.
iterator(const iterator &iter)
void set(double value)
Set the value to a double precision float.
bool empty() const
Is the array empty.
static int parse(Value &val, ParseCallback cb, void *userData)
Parses user defined data using characters from a user defined callback function.
const Value & operator[](const String &key) const
Returns constant reference of the Value of key.
bool operator!=(iterator iter) const
Compare to another iterator.
void clear()
Clears the string's contents.
SceSize length() const
Returns the length of the String in bytes.
String & operator+=(unsigned char c)
Appends c to the string.
const SceUInt64 & getUInteger() const
Returns a constant reference to the value.
SceDouble * referReal()
Returns a pointer to the value.
iterator & operator=(const iterator &iter)
Assignment operator.
bool empty() const
Is the object empty?
void toString(String &s) const
Sets s to be a string representation of the value.
ValueType getType() const
Returns the ValueType of the value.
const Value & getValue(const String &key) const
Returns a constant reference to the value.
virtual void notifyError(int errorCode, SceSize size, void *userData)
The base class definition prints an error to sceClibPrintf.
SceSize size() const
Gets the number of child Pairs.
Value value
Value assigned to the property.
Definition: json.h:879
void clear()
Will empty the Array, removing all child valus.
void operator++(int adv)
Advance the iterator by adv.
bool compare(const char *s) const
Compares the string to s.
const SceInt64 & getInteger() const
Returns a constant reference to the value.
String & append(const char *s)
Append string s to the end.
int serialize(String &s)
Serializes the data into a string in JSON format.
SceSize bufSize
Size of the buffer used for reading JSON file data in Parser::parse(Value&, const char*).
Definition: json.h:123
Value * referValue(SceSize pos)
Returns a pointer to the value.
char at(SceSize pos) const
Returns the character found at pos.
SceUInt64 * referUInteger()
Returns a pointer to the value.
union sce::Json::Value::@8 value
Union of different value types.
iterator & operator++()
Increment the iterator.
SceJsonErrorCode
Enumerator of different errors in this library.
Definition: json.h:20
const Array & getArray() const
Returns a constant reference to the array.
iterator & operator=(const iterator &iter)
Assignment Operator.
const SceDouble & getReal() const
Returns a constant reference to the value.
SceSize rfind(const char *s, SceSize pos) const
Searches the string for the last instance of a sequence.
void resize(SceSize n)
Resizes the string to a length of n characters.
SceSize find(const char *s, SceSize pos) const
Searches the string for the first instance of a sequence.
void set(const Value &value)
Set the value.
Value & getRoot() const
Returns a reference to the root Value.
SceSize rfind(const char *s, SceSize pos, SceSize n) const
Searches the string for the last instance of a sequence.
void set(const Array &value)
Set the value to an Array.
void set(SceUInt64 value)
Set the value to an unsigned long integer(64 bits)
SceBool * referBoolean()
Returns a pointer to the value.
Object * object
Definition: json.h:855
const char * c_str() const
Returns a C style string buffer of the String.
const Value & getValue(SceSize pos) const
Returns a constant reference to the value.
@ SCE_JSON_ERROR_LOADED
The module has already been initialised.
Definition: json.h:28
@ SCE_JSON_ERROR_MEM_ALLOC
Internal Memory Allocation failure(returned nullptr).
Definition: json.h:32
@ SCE_JSON_PARSER_ERROR_EMPTY_BUF
InitParameter.bufSize is 0.
Definition: json.h:36
@ SCE_JSON_PARSER_ERROR_INVALID_TOKEN
Invalid character in the parsed data.
Definition: json.h:44
@ SCE_JSON_PARSER_ERROR_FILE_LOAD
Parser failed to load file.
Definition: json.h:40
@ SCE_JSON_ERROR_UNLOADED
The module has not been initialised.
Definition: json.h:24
int SceBool
Definition: types.h:59
unsigned int SceSize
Definition: types.h:56
double SceDouble
Definition: types.h:68
int64_t SceInt64
Definition: types.h:50
uint64_t SceUInt64
Definition: types.h:51