vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:

#include <psp2/json.h>


Link the library to the executable:

SceLibJson_stub


Load the required module:

int sceSysmoduleLoadModule(SceSysmoduleModuleId id)
Load a module.
@ SCE_SYSMODULE_JSON
JSON module.
Definition: sysmodule.h:112



Note
Compiling and linking with this library requires you to compile your code with the compiler flag -fno-rtti.

Functions

 sce::Json::MemAllocator::MemAllocator ()
 
virtual sce::Json::MemAllocator::~MemAllocator ()
 
virtual void * sce::Json::MemAllocator::allocateMemory (SceSize size, void *userData)=0
 Virtual Function for memory allocation. More...
 
virtual void sce::Json::MemAllocator::freeMemory (void *ptr, void *userData)=0
 Virtual Function for memory deallocation. More...
 
virtual void sce::Json::MemAllocator::notifyError (int errorCode, SceSize size, void *userData)
 The base class definition prints an error to sceClibPrintf. More...
 
 sce::Json::Initializer::Initializer ()
 
 sce::Json::Initializer::~Initializer ()
 
int sce::Json::Initializer::initialize (const InitParameter *initParams)
 Initialise the library. More...
 
int sce::Json::Initializer::terminate ()
 Terminate the library. More...
 
 sce::Json::Array::iterator::iterator ()
 
 sce::Json::Array::iterator::iterator (const iterator &iter)
 
 sce::Json::Array::iterator::~iterator ()
 
void sce::Json::Array::iterator::advance (SceSize adv)
 Advance the iterator by adv. More...
 
iteratorsce::Json::Array::iterator::operator= (const iterator &iter)
 Assignment operator. More...
 
void sce::Json::Array::iterator::operator++ (int adv)
 Advance the iterator by adv. More...
 
void sce::Json::Array::iterator::operator++ ()
 Increment the iterator. More...
 
Valuesce::Json::Array::iterator::operator* () const
 Dereference the iterator. More...
 
bool sce::Json::Array::iterator::operator!= (iterator iter) const
 Compare to another iterator. More...
 
Valuesce::Json::Array::iterator::operator-> () const
 Access the Value being pointed to. More...
 
 sce::Json::Array::Array ()
 
 sce::Json::Array::Array (const Array &arr)
 
 sce::Json::Array::~Array ()
 
iterator sce::Json::Array::begin () const
 Get an iterator pointing to the start of the Array. More...
 
iterator sce::Json::Array::end () const
 Get an iterator pointing to after the end of the Array. More...
 
iterator sce::Json::Array::insert (const iterator &pos, const Value &val)
 Insert a Value at pos. More...
 
iterator sce::Json::Array::erase (const iterator &pos)
 Erase the Value at pos. More...
 
Valuesce::Json::Array::back () const
 Returns a reference to the last element in the Array. More...
 
void sce::Json::Array::clear ()
 Will empty the Array, removing all child valus. More...
 
void sce::Json::Array::push_back (const Value &val)
 Adds val to the end of the Array. More...
 
void sce::Json::Array::pop_back ()
 Removes the last child value. More...
 
SceSize sce::Json::Array::size () const
 Get the size of the array. More...
 
bool sce::Json::Array::empty () const
 Is the array empty. More...
 
Arraysce::Json::Array::operator= (const Array &arr)
 Assignment Operator. More...
 
 sce::Json::String::String ()
 
 sce::Json::String::String (const char *s)
 
 sce::Json::String::String (const String &str)
 
 sce::Json::String::~String ()
 
Stringsce::Json::String::append (const char *s)
 Append string s to the end. More...
 
Stringsce::Json::String::append (const char *s, SceSize pos)
 Append string s to position pos. More...
 
Stringsce::Json::String::append (const String &str)
 Append string str. More...
 
String sce::Json::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 object. More...
 
char sce::Json::String::at (SceSize pos) const
 Returns the character found at pos. More...
 
SceSize sce::Json::String::find (const char *s, SceSize pos) const
 Searches the string for the first instance of a sequence. More...
 
SceSize sce::Json::String::find (const char *s, SceSize pos, SceSize n) const
 Searches the string for the first instance of a sequence. More...
 
SceSize sce::Json::String::find (const String &str, SceSize pos) const
 Searches the string for the first instance of a sequence. More...
 
SceSize sce::Json::String::find (char c, SceSize pos) const
 Searches the string for the first instance of a sequence. More...
 
SceSize sce::Json::String::rfind (const char *s, SceSize pos) const
 Searches the string for the last instance of a sequence. More...
 
SceSize sce::Json::String::rfind (const char *s, SceSize pos, SceSize n) const
 Searches the string for the last instance of a sequence. More...
 
SceSize sce::Json::String::rfind (const String &str, SceSize pos) const
 Searches the string for the last instance of a sequence. More...
 
SceSize sce::Json::String::rfind (char c, SceSize pos) const
 Searches the string for the last instance of a sequence. More...
 
void sce::Json::String::clear ()
 Clears the string's contents. More...
 
bool sce::Json::String::empty () const
 Returns whether the string is empty or not. More...
 
SceSize sce::Json::String::size () const
 Returns the length of the String in bytes. More...
 
SceSize sce::Json::String::length () const
 Returns the length of the String in bytes. More...
 
const char * sce::Json::String::c_str () const
 Returns a C style string buffer of the String. More...
 
void sce::Json::String::resize (SceSize n)
 Resizes the string to a length of n characters. More...
 
bool sce::Json::String::compare (const char *s) const
 Compares the string to s. More...
 
bool sce::Json::String::compare (const String &str) const
 Compares the string to str. More...
 
Stringsce::Json::String::operator+= (const char *s)
 Appends s to the string. More...
 
Stringsce::Json::String::operator+= (unsigned char c)
 Appends c to the string. More...
 
bool sce::Json::String::operator== (const char *s) const
 Compares the string to s. More...
 
bool sce::Json::String::operator== (const String &str) const
 Compares the string to str. More...
 
Stringsce::Json::String::operator= (const String &str)
 Assignment Operator. More...
 
 sce::Json::Value::Value ()
 
 sce::Json::Value::Value (ValueType type)
 
 sce::Json::Value::Value (SceBool value)
 
 sce::Json::Value::Value (SceInt64 value)
 
 sce::Json::Value::Value (SceUInt64 value)
 
 sce::Json::Value::Value (double value)
 
 sce::Json::Value::Value (const String &value)
 
 sce::Json::Value::Value (const Array &value)
 
 sce::Json::Value::Value (const Object &value)
 
 sce::Json::Value::Value (const Value &value)
 
 sce::Json::Value::~Value ()
 
void sce::Json::Value::toString (String &s) const
 Sets s to be a string representation of the value. More...
 
void sce::Json::Value::swap (Value &val)
 Swaps the value with another Value. More...
 
void sce::Json::Value::clear ()
 Clears the value by setting to null. More...
 
SceSize sce::Json::Value::count () const
 Returns number of children. More...
 
ValueType sce::Json::Value::getType () const
 Returns the ValueType of the value. More...
 
void sce::Json::Value::set (ValueType type)
 Set the type. More...
 
void sce::Json::Value::set (SceBool value)
 Set the value to a boolean. More...
 
void sce::Json::Value::set (SceInt64 value)
 Set the value to a long integer(64 bits) More...
 
void sce::Json::Value::set (SceUInt64 value)
 Set the value to an unsigned long integer(64 bits) More...
 
void sce::Json::Value::set (double value)
 Set the value to a double precision float. More...
 
void sce::Json::Value::set (const String &value)
 Set the value to a String. More...
 
void sce::Json::Value::set (const Array &value)
 Set the value to an Array. More...
 
void sce::Json::Value::set (const Object &value)
 Set the value to an Object. More...
 
void sce::Json::Value::set (const Value &value)
 Set the value. More...
 
int sce::Json::Value::setNullAccessCallback (NullAccessCallback cb, void *userData)
 Set the Value's NullAccessCallback. More...
 
Valuesce::Json::Value::getRoot () const
 Returns a reference to the root Value. More...
 
const SceBoolsce::Json::Value::getBoolean () const
 Returns a constant reference to the value. More...
 
const SceInt64sce::Json::Value::getInteger () const
 Returns a constant reference to the value. More...
 
const SceUInt64sce::Json::Value::getUInteger () const
 Returns a constant reference to the value. More...
 
const SceDoublesce::Json::Value::getReal () const
 Returns a constant reference to the value. More...
 
const Stringsce::Json::Value::getString () const
 Returns a constant reference to the string. More...
 
const Arraysce::Json::Value::getArray () const
 Returns a constant reference to the array. More...
 
const Objectsce::Json::Value::getObject () const
 Returns a constant reference to the object. More...
 
const Valuesce::Json::Value::getValue (SceSize pos) const
 Returns a constant reference to the value. More...
 
const Valuesce::Json::Value::getValue (const String &key) const
 Returns a constant reference to the value. More...
 
SceBoolsce::Json::Value::referBoolean ()
 Returns a pointer to the value. More...
 
SceInt64sce::Json::Value::referInteger ()
 Returns a pointer to the value. More...
 
SceUInt64sce::Json::Value::referUInteger ()
 Returns a pointer to the value. More...
 
SceDoublesce::Json::Value::referReal ()
 Returns a pointer to the value. More...
 
Stringsce::Json::Value::referString ()
 Returns a pointer to the string. More...
 
Arraysce::Json::Value::referArray ()
 Returns a pointer to the array. More...
 
Objectsce::Json::Value::referObject ()
 Returns a pointer to the object. More...
 
Valuesce::Json::Value::referValue (SceSize pos)
 Returns a pointer to the value. More...
 
Valuesce::Json::Value::referValue (const String &key)
 Returns a pointer to the value. More...
 
int sce::Json::Value::serialize (String &s)
 Serializes the data into a string in JSON format. More...
 
int sce::Json::Value::serialize (String &str, SerializeCallback cb, void *userData)
 Serializes the values into a string in JSON format. More...
 
const Valuesce::Json::Value::operator[] (const String &key) const
 Returns constant reference of the Value of key. More...
 
const Valuesce::Json::Value::operator[] (const char *key) const
 Returns constant reference of the Value of key. More...
 
const Valuesce::Json::Value::operator[] (SceSize pos) const
 Returns constant reference of the Value at pos. More...
 
Valuesce::Json::Value::operator= (const Value &value)
 Assignment Operator. More...
 
 sce::Json::Value::operator bool () const
 
 sce::Json::Object::Pair::Pair ()
 
 sce::Json::Object::Pair::Pair (const String &name, const Value &value)
 
 sce::Json::Object::Pair::~Pair ()
 
 sce::Json::Object::iterator::iterator ()
 
 sce::Json::Object::iterator::iterator (const iterator &iter)
 
 sce::Json::Object::iterator::~iterator ()
 
void sce::Json::Object::iterator::advance (SceSize adv)
 Advance the iterator. More...
 
iteratorsce::Json::Object::iterator::operator++ (int adv)
 Increment the iterator. More...
 
iteratorsce::Json::Object::iterator::operator++ ()
 Increment the iterator. More...
 
Pairsce::Json::Object::iterator::operator* () const
 Dereference the iterator. More...
 
bool sce::Json::Object::iterator::operator== (iterator iter) const
 Compare to another iterator. More...
 
bool sce::Json::Object::iterator::operator!= (iterator iter) const
 Compare to another iterator. More...
 
Pairsce::Json::Object::iterator::operator-> () const
 Access the Pair the iterator is pointing to. More...
 
iteratorsce::Json::Object::iterator::operator= (const iterator &iter)
 Assignment Operator. More...
 
 sce::Json::Object::Object ()
 
 sce::Json::Object::Object (const Object &obj)
 
 sce::Json::Object::~Object ()
 
iterator sce::Json::Object::begin () const
 Returns an iterator to the first child element. More...
 
iterator sce::Json::Object::end () const
 Returns an iterator to after the last child element. More...
 
iterator sce::Json::Object::insert (const Pair &p)
 Inserts a pair into the Object. More...
 
iterator sce::Json::Object::find (const String &key)
 Finds a Pair with a matching key. More...
 
void sce::Json::Object::clear ()
 Empty the object. More...
 
void sce::Json::Object::erase (const String &str)
 Remove the Pair with the key str. More...
 
SceSize sce::Json::Object::size () const
 Gets the number of child Pairs. More...
 
bool sce::Json::Object::empty () const
 Is the object empty? More...
 
Valuesce::Json::Object::operator[] (const String &str)
 Searches for a pair with a key matching str. More...
 
Objectsce::Json::Object::operator= (const Object &obj)
 Assignment Operator. More...
 
static int sce::Json::Parser::parse (Value &val, ParseCallback cb, void *userData)
 Parses user defined data using characters from a user defined callback function. More...
 
static int sce::Json::Parser::parse (Value &val, const char *buf, SceSize size)
 Parses a string buffer. More...
 
static int sce::Json::Parser::parse (Value &val, const char *path)
 Parse a JSON file. More...
 

Typedefs

typedef int(* sce::Json::Value::SerializeCallback) (String &str, void *userData)
 Callback for serialization. More...
 
typedef Value const &(* sce::Json::Value::NullAccessCallback) (ValueType type, const Value *parent, void *userData)
 Callback for NullValue access. More...
 
typedef int(* sce::Json::Parser::ParseCallback) (char &ch, void *userData)
 Callback for outputing a character to parse. More...
 

Data Structure Documentation

◆ sce::Json::MemAllocator

class sce::Json::MemAllocator

Base class for reimplementation of memory allocation.

This class must be derived from.

Public Member Functions

 MemAllocator ()
 
virtual ~MemAllocator ()
 
virtual void * allocateMemory (SceSize size, void *userData)=0
 Virtual Function for memory allocation. More...
 
virtual void freeMemory (void *ptr, void *userData)=0
 Virtual Function for memory deallocation. More...
 
virtual void notifyError (int errorCode, SceSize size, void *userData)
 The base class definition prints an error to sceClibPrintf. More...
 

◆ sce::Json::InitParameter

class sce::Json::InitParameter

Utility Data Structure to pass on initialisation parameters.

Data Fields
MemAllocator * allocator Pointer to a MemAllocator object for internal memory allocations.

Required field.

void * userData User defined data sent to overriden MemAllocator functions.
SceSize bufSize Size of the buffer used for reading JSON file data in Parser::parse(Value&, const char*).

Does not have to be the size of the file, but a smaller buffer size will result in more IO calls.

◆ sce::Json::Initializer

class sce::Json::Initializer

Utility class for initialising and terminating the library.

Public Member Functions

 Initializer ()
 
 ~Initializer ()
 
int initialize (const InitParameter *initParams)
 Initialise the library. More...
 
int terminate ()
 Terminate the library. More...
 

◆ sce::Json::Array

class sce::Json::Array

Class for JSON arrays.

Public Member Functions

 Array ()
 
 Array (const Array &arr)
 
 ~Array ()
 
iterator begin () const
 Get an iterator pointing to the start of the Array. More...
 
iterator end () const
 Get an iterator pointing to after the end of the Array. More...
 
iterator insert (const iterator &pos, const Value &val)
 Insert a Value at pos. More...
 
iterator erase (const iterator &pos)
 Erase the Value at pos. More...
 
Valueback () const
 Returns a reference to the last element in the Array. More...
 
void clear ()
 Will empty the Array, removing all child valus. More...
 
void push_back (const Value &val)
 Adds val to the end of the Array. More...
 
void pop_back ()
 Removes the last child value. More...
 
SceSize size () const
 Get the size of the array. More...
 
bool empty () const
 Is the array empty. More...
 
Arrayoperator= (const Array &arr)
 Assignment Operator. More...
 

Private Attributes

void * implData
 Pointer to internal implementation data. More...
 

◆ sce::Json::Array::iterator

class sce::Json::Array::iterator

Class for iterating over Array members.

Public Member Functions

 iterator ()
 
 iterator (const iterator &iter)
 
 ~iterator ()
 
void advance (SceSize adv)
 Advance the iterator by adv. More...
 
iteratoroperator= (const iterator &iter)
 Assignment operator. More...
 
void operator++ (int adv)
 Advance the iterator by adv. More...
 
void operator++ ()
 Increment the iterator. More...
 
Valueoperator* () const
 Dereference the iterator. More...
 
bool operator!= (iterator iter) const
 Compare to another iterator. More...
 
Valueoperator-> () const
 Access the Value being pointed to. More...
 

Private Attributes

void * implData
 Pointer to internal implementation data. More...
 

◆ sce::Json::String

class sce::Json::String

Class for JSON strings.

Public Member Functions

 String ()
 
 String (const char *s)
 
 String (const String &str)
 
 ~String ()
 
Stringappend (const char *s)
 Append string s to the end. More...
 
Stringappend (const char *s, SceSize pos)
 Append string s to position pos. More...
 
Stringappend (const String &str)
 Append string str. More...
 
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 object. More...
 
char at (SceSize pos) const
 Returns the character found at pos. More...
 
SceSize find (const char *s, SceSize pos) const
 Searches the string for the first instance of a sequence. More...
 
SceSize find (const char *s, SceSize pos, SceSize n) const
 Searches the string for the first instance of a sequence. More...
 
SceSize find (const String &str, SceSize pos) const
 Searches the string for the first instance of a sequence. More...
 
SceSize find (char c, SceSize pos) const
 Searches the string for the first instance of a sequence. More...
 
SceSize rfind (const char *s, SceSize pos) const
 Searches the string for the last instance of a sequence. More...
 
SceSize rfind (const char *s, SceSize pos, SceSize n) const
 Searches the string for the last instance of a sequence. More...
 
SceSize rfind (const String &str, SceSize pos) const
 Searches the string for the last instance of a sequence. More...
 
SceSize rfind (char c, SceSize pos) const
 Searches the string for the last instance of a sequence. More...
 
void clear ()
 Clears the string's contents. More...
 
bool empty () const
 Returns whether the string is empty or not. More...
 
SceSize size () const
 Returns the length of the String in bytes. More...
 
SceSize length () const
 Returns the length of the String in bytes. More...
 
const char * c_str () const
 Returns a C style string buffer of the String. More...
 
void resize (SceSize n)
 Resizes the string to a length of n characters. More...
 
bool compare (const char *s) const
 Compares the string to s. More...
 
bool compare (const String &str) const
 Compares the string to str. More...
 
Stringoperator+= (const char *s)
 Appends s to the string. More...
 
Stringoperator+= (unsigned char c)
 Appends c to the string. More...
 
bool operator== (const char *s) const
 Compares the string to s. More...
 
bool operator== (const String &str) const
 Compares the string to str. More...
 
Stringoperator= (const String &str)
 Assignment Operator. More...
 

Static Public Attributes

static const SceSize npos = -1
 

Private Attributes

void * implData
 Pointer to internal implementation data. More...
 

◆ sce::Json::Value

class sce::Json::Value

Class for value of JSON property.

Public Types

typedef int(* SerializeCallback) (String &str, void *userData)
 Callback for serialization. More...
 
typedef Value const &(* NullAccessCallback) (ValueType type, const Value *parent, void *userData)
 Callback for NullValue access. More...
 

Public Member Functions

 Value ()
 
 Value (ValueType type)
 
 Value (SceBool value)
 
 Value (SceInt64 value)
 
 Value (SceUInt64 value)
 
 Value (double value)
 
 Value (const String &value)
 
 Value (const Array &value)
 
 Value (const Object &value)
 
 Value (const Value &value)
 
 ~Value ()
 
void toString (String &s) const
 Sets s to be a string representation of the value. More...
 
void swap (Value &val)
 Swaps the value with another Value. More...
 
void clear ()
 Clears the value by setting to null. More...
 
SceSize count () const
 Returns number of children. More...
 
ValueType getType () const
 Returns the ValueType of the value. More...
 
void set (ValueType type)
 Set the type. More...
 
void set (SceBool value)
 Set the value to a boolean. More...
 
void set (SceInt64 value)
 Set the value to a long integer(64 bits) More...
 
void set (SceUInt64 value)
 Set the value to an unsigned long integer(64 bits) More...
 
void set (double value)
 Set the value to a double precision float. More...
 
void set (const String &value)
 Set the value to a String. More...
 
void set (const Array &value)
 Set the value to an Array. More...
 
void set (const Object &value)
 Set the value to an Object. More...
 
void set (const Value &value)
 Set the value. More...
 
int setNullAccessCallback (NullAccessCallback cb, void *userData)
 Set the Value's NullAccessCallback. More...
 
ValuegetRoot () const
 Returns a reference to the root Value. More...
 
const SceBoolgetBoolean () const
 Returns a constant reference to the value. More...
 
const SceInt64getInteger () const
 Returns a constant reference to the value. More...
 
const SceUInt64getUInteger () const
 Returns a constant reference to the value. More...
 
const SceDoublegetReal () const
 Returns a constant reference to the value. More...
 
const StringgetString () const
 Returns a constant reference to the string. More...
 
const ArraygetArray () const
 Returns a constant reference to the array. More...
 
const ObjectgetObject () const
 Returns a constant reference to the object. More...
 
const ValuegetValue (SceSize pos) const
 Returns a constant reference to the value. More...
 
const ValuegetValue (const String &key) const
 Returns a constant reference to the value. More...
 
SceBoolreferBoolean ()
 Returns a pointer to the value. More...
 
SceInt64referInteger ()
 Returns a pointer to the value. More...
 
SceUInt64referUInteger ()
 Returns a pointer to the value. More...
 
SceDoublereferReal ()
 Returns a pointer to the value. More...
 
StringreferString ()
 Returns a pointer to the string. More...
 
ArrayreferArray ()
 Returns a pointer to the array. More...
 
ObjectreferObject ()
 Returns a pointer to the object. More...
 
ValuereferValue (SceSize pos)
 Returns a pointer to the value. More...
 
ValuereferValue (const String &key)
 Returns a pointer to the value. More...
 
int serialize (String &s)
 Serializes the data into a string in JSON format. More...
 
int serialize (String &str, SerializeCallback cb, void *userData)
 Serializes the values into a string in JSON format. More...
 
const Valueoperator[] (const String &key) const
 Returns constant reference of the Value of key. More...
 
const Valueoperator[] (const char *key) const
 Returns constant reference of the Value of key. More...
 
const Valueoperator[] (SceSize pos) const
 Returns constant reference of the Value at pos. More...
 
Valueoperator= (const Value &value)
 Assignment Operator. More...
 
 operator bool () const
 

Private Attributes

Valueparent
 Pointer to the value's parent. More...
 
NullAccessCallback cb
 The value's NullAccessCallback. More...
 
union {
SceBool boolean
 
SceInt64 integer
 
SceUInt64 uinteger
 
SceDouble real
 
Stringstring
 
Arrayarray
 
Objectobject
 
value
 Union of different value types. More...
 
char unused [4]
 Unused. More...
 
ValueType type
 The type of the value. More...
 

◆ sce::Json::Object

class sce::Json::Object

Class for JSON objects.

Public Member Functions

 Object ()
 
 Object (const Object &obj)
 
 ~Object ()
 
iterator begin () const
 Returns an iterator to the first child element. More...
 
iterator end () const
 Returns an iterator to after the last child element. More...
 
iterator insert (const Pair &p)
 Inserts a pair into the Object. More...
 
iterator find (const String &key)
 Finds a Pair with a matching key. More...
 
void clear ()
 Empty the object. More...
 
void erase (const String &str)
 Remove the Pair with the key str. More...
 
SceSize size () const
 Gets the number of child Pairs. More...
 
bool empty () const
 Is the object empty? More...
 
Valueoperator[] (const String &str)
 Searches for a pair with a key matching str. More...
 
Objectoperator= (const Object &obj)
 Assignment Operator. More...
 

Private Attributes

void * implData
 Pointer to internal implementation data. More...
 

◆ sce::Json::Object::Pair

class sce::Json::Object::Pair

Key-Value Pair of JSON Object property.

Public Member Functions

 Pair ()
 
 Pair (const String &name, const Value &value)
 
 ~Pair ()
 

Data Fields

String key
 Name assigned to the property. More...
 
char unused [4]
 Unused. More...
 
Value value
 Value assigned to the property. More...
 

◆ sce::Json::Object::iterator

class sce::Json::Object::iterator

Class for iterating over Object members.

Public Member Functions

 iterator ()
 
 iterator (const iterator &iter)
 
 ~iterator ()
 
void advance (SceSize adv)
 Advance the iterator. More...
 
iteratoroperator++ (int adv)
 Increment the iterator. More...
 
iteratoroperator++ ()
 Increment the iterator. More...
 
Pairoperator* () const
 Dereference the iterator. More...
 
bool operator== (iterator iter) const
 Compare to another iterator. More...
 
bool operator!= (iterator iter) const
 Compare to another iterator. More...
 
Pairoperator-> () const
 Access the Pair the iterator is pointing to. More...
 
iteratoroperator= (const iterator &iter)
 Assignment Operator. More...
 

Private Attributes

void * implData
 Pointer to internal implementation data. More...
 

◆ sce::Json::Parser

class sce::Json::Parser

Static Class for parsing.

Public Types

typedef int(* ParseCallback) (char &ch, void *userData)
 Callback for outputing a character to parse. More...
 

Static Public Member Functions

static int parse (Value &val, ParseCallback cb, void *userData)
 Parses user defined data using characters from a user defined callback function. More...
 
static int parse (Value &val, const char *buf, SceSize size)
 Parses a string buffer. More...
 
static int parse (Value &val, const char *path)
 Parse a JSON file. More...
 

Typedef Documentation

◆ SerializeCallback

typedef int(* sce::Json::Value::SerializeCallback) (String &str, void *userData)

Callback for serialization.

It is called at certain points in the serialization process.

Parameters
[in,out]str- The current state of the parser output.
[in]userData- User defined data for the function.

◆ NullAccessCallback

typedef Value const&(* sce::Json::Value::NullAccessCallback) (ValueType type, const Value *parent, void *userData)

Callback for NullValue access.

It is called when the type of the Value is ValueType::NullValue and the Value is accessed.

Parameters
[in]type- The type of value requested.
[in]parent- A pointer to the parent of the Value accessed.
[in]userData- User defined data for the function.
Returns
A valid Value of the type given.

◆ ParseCallback

typedef int(* sce::Json::Parser::ParseCallback) (char &ch, void *userData)

Callback for outputing a character to parse.

Example:
struct Data
{
char *buf; // Character buffer storing the JSON data.
};
int Parse_Callback(char& ch, void* userData)
{
Data *dat = (Data *)data;
int uVar1;
ch = *dat->buf;
ret = SCE_JSON_ERROR_PARSE_INVALID_CHAR;
if (ch != '\0')
{
dat->buf = dat->buf + 1;
ret = 0;
}
return ret;
}
Parameters
[out]ch- The character to be sent back to the parser.
[in]userData- User defined data for the function.

Enumeration Type Documentation

◆ SceJsonErrorCode

Enumerator of different errors in this library.

Enumerator
SCE_JSON_ERROR_UNLOADED 

The module has not been initialised.

SCE_JSON_ERROR_LOADED 

The module has already been initialised.

SCE_JSON_ERROR_MEM_ALLOC 

Internal Memory Allocation failure(returned nullptr).

SCE_JSON_PARSER_ERROR_EMPTY_BUF 

InitParameter.bufSize is 0.

SCE_JSON_PARSER_ERROR_FILE_LOAD 

Parser failed to load file.

SCE_JSON_PARSER_ERROR_INVALID_TOKEN 

Invalid character in the parsed data.

◆ ValueType

enum sce::Json::ValueType
strong

Strongly typed Enumerator of different types of Values.

Function Documentation

◆ MemAllocator()

sce::Json::MemAllocator::MemAllocator ( )

◆ ~MemAllocator()

virtual sce::Json::MemAllocator::~MemAllocator ( )
virtual

◆ allocateMemory()

virtual void* sce::Json::MemAllocator::allocateMemory ( SceSize  size,
void *  userData 
)
pure virtual

Virtual Function for memory allocation.

Parameters
[in]size- Size of the allocated memory
[in]data- User defined data for the function.
Returns
Pointer to the allocated memory

◆ freeMemory()

virtual void sce::Json::MemAllocator::freeMemory ( void *  ptr,
void *  userData 
)
pure virtual

Virtual Function for memory deallocation.

Parameters
[in]ptr- Pointer to memory.
[in]data- User defined data for the function.

◆ notifyError()

virtual void sce::Json::MemAllocator::notifyError ( int  errorCode,
SceSize  size,
void *  userData 
)
virtual

The base class definition prints an error to sceClibPrintf.

◆ Initializer()

sce::Json::Initializer::Initializer ( )

◆ ~Initializer()

sce::Json::Initializer::~Initializer ( )

◆ initialize()

int sce::Json::Initializer::initialize ( const InitParameter initParams)

Initialise the library.

Parameters
[in]initParams- Initialisation parameters for the library.
Returns
0 on success, <0 on error.

◆ terminate()

int sce::Json::Initializer::terminate ( )

Terminate the library.

Returns
0 on success, <0 on error.

◆ iterator() [1/4]

sce::Json::Array::iterator::iterator ( )

◆ iterator() [2/4]

sce::Json::Array::iterator::iterator ( const iterator iter)

◆ ~iterator() [1/2]

sce::Json::Array::iterator::~iterator ( )

◆ advance() [1/2]

void sce::Json::Array::iterator::advance ( SceSize  adv)

Advance the iterator by adv.

◆ operator=() [1/6]

iterator& sce::Json::Array::iterator::operator= ( const iterator iter)

Assignment operator.

◆ operator++() [1/4]

void sce::Json::Array::iterator::operator++ ( int  adv)

Advance the iterator by adv.

◆ operator++() [2/4]

void sce::Json::Array::iterator::operator++ ( )

Increment the iterator.

◆ operator*() [1/2]

Value& sce::Json::Array::iterator::operator* ( ) const

Dereference the iterator.

Returns
The Value the iterator is pointing to.

◆ operator!=() [1/2]

bool sce::Json::Array::iterator::operator!= ( iterator  iter) const

Compare to another iterator.

Parameters
[in]iter- The iterator to compare to.
Returns
true if they are not equivalent.

◆ operator->() [1/2]

Value* sce::Json::Array::iterator::operator-> ( ) const

Access the Value being pointed to.

◆ Array() [1/2]

sce::Json::Array::Array ( )

◆ Array() [2/2]

sce::Json::Array::Array ( const Array arr)

◆ ~Array()

sce::Json::Array::~Array ( )

◆ begin() [1/2]

iterator sce::Json::Array::begin ( ) const

Get an iterator pointing to the start of the Array.

Returns
The iterator.

◆ end() [1/2]

iterator sce::Json::Array::end ( ) const

Get an iterator pointing to after the end of the Array.

Returns
The iterator.

◆ insert() [1/2]

iterator sce::Json::Array::insert ( const iterator pos,
const Value val 
)

Insert a Value at pos.

Parameters
[in]pos- An iterator pointing to the point to insert the Value.
[in]val- The Value to insert.
Returns
An iterator pointing to the inserted value.

◆ erase() [1/2]

iterator sce::Json::Array::erase ( const iterator pos)

Erase the Value at pos.

Parameters
[in]pos- The position of the Value to erase.
Returns
iterator following the removed Value

◆ back()

Value& sce::Json::Array::back ( ) const

Returns a reference to the last element in the Array.

Returns
The refence to the value.

◆ clear() [1/4]

void sce::Json::Array::clear ( )

Will empty the Array, removing all child valus.

◆ push_back()

void sce::Json::Array::push_back ( const Value val)

Adds val to the end of the Array.

◆ pop_back()

void sce::Json::Array::pop_back ( )

Removes the last child value.

◆ size() [1/3]

SceSize sce::Json::Array::size ( ) const

Get the size of the array.

Returns
The size of the array.

◆ empty() [1/3]

bool sce::Json::Array::empty ( ) const

Is the array empty.

Returns
true if empty, false otherwise.

◆ operator=() [2/6]

Array& sce::Json::Array::operator= ( const Array arr)

Assignment Operator.

◆ String() [1/3]

sce::Json::String::String ( )

◆ String() [2/3]

sce::Json::String::String ( const char *  s)

◆ String() [3/3]

sce::Json::String::String ( const String str)

◆ ~String()

sce::Json::String::~String ( )

◆ append() [1/3]

String& sce::Json::String::append ( const char *  s)

Append string s to the end.

Parameters
[in]s- Pointer to the C string to append.
Returns
A reference the new string

◆ append() [2/3]

String& sce::Json::String::append ( const char *  s,
SceSize  pos 
)

Append string s to position pos.

Parameters
[in]s- Pointer to the C string to append.
[in]pos- Position in the String to append to.
Returns
A reference the new string

◆ append() [3/3]

String& sce::Json::String::append ( const String str)

Append string str.

Parameters
[in]str- String to append.
Returns
A reference the new string

◆ substr()

String sce::Json::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 object.

Parameters
[in]pos- The starting position of the sub-string.
[in]len- The length of the sub-string.
Returns
The sub-string found at pos.

◆ at()

char sce::Json::String::at ( SceSize  pos) const

Returns the character found at pos.

Parameters
[in]pos- The position of the desired character.
Returns
The character found.

◆ find() [1/5]

SceSize sce::Json::String::find ( const char *  s,
SceSize  pos 
) const

Searches the string for the first instance of a sequence.

Parameters
[in]s- The sequence to search for.
[in]pos- Position to start searching from.
Returns
The position of the first instance of the sequence. Will return String::npos if not found

◆ find() [2/5]

SceSize sce::Json::String::find ( const char *  s,
SceSize  pos,
SceSize  n 
) const

Searches the string for the first instance of a sequence.

Parameters
[in]s- The sequence to search for.
[in]pos- Position to start searching from.
[in]n- Length of the sequence.
Returns
The position of the first instance of the sequence. Will return String::npos if not found

◆ find() [3/5]

SceSize sce::Json::String::find ( const String str,
SceSize  pos 
) const

Searches the string for the first instance of a sequence.

Parameters
[in]str- The sequence to search for.
[in]pos- Position to start searching from.
Returns
The position of the first instance of the sequence. Will return String::npos if not found

◆ find() [4/5]

SceSize sce::Json::String::find ( char  c,
SceSize  pos 
) const

Searches the string for the first instance of a sequence.

Parameters
[in]c- The sequence to search for.
[in]pos- Position to start searching from.
Returns
The position of the first instance of the sequence. Will return String::npos if not found

◆ rfind() [1/4]

SceSize sce::Json::String::rfind ( const char *  s,
SceSize  pos 
) const

Searches the string for the last instance of a sequence.

Parameters
[in]s- The sequence to search for.
[in]pos- Position to start searching from.
Returns
The position of the last instance of the sequence. Will return String::npos if not found

◆ rfind() [2/4]

SceSize sce::Json::String::rfind ( const char *  s,
SceSize  pos,
SceSize  n 
) const

Searches the string for the last instance of a sequence.

Parameters
[in]s- The sequence to search for.
[in]pos- Position to start searching from.
[in]n- Length of the sequence.
Returns
The position of the last instance of the sequence. Will return String::npos if not found

◆ rfind() [3/4]

SceSize sce::Json::String::rfind ( const String str,
SceSize  pos 
) const

Searches the string for the last instance of a sequence.

Parameters
[in]str- The sequence to search for.
[in]pos- Position to start searching from.
Returns
The position of the last instance of the sequence. Will return String::npos if not found

◆ rfind() [4/4]

SceSize sce::Json::String::rfind ( char  c,
SceSize  pos 
) const

Searches the string for the last instance of a sequence.

Parameters
[in]c- The sequence to search for.
[in]pos- Position to start searching from.
Returns
The position of the last instance of the sequence. Will return String::npos if not found

◆ clear() [2/4]

void sce::Json::String::clear ( )

Clears the string's contents.

◆ empty() [2/3]

bool sce::Json::String::empty ( ) const

Returns whether the string is empty or not.

Returns
true if empty, false if not

◆ size() [2/3]

SceSize sce::Json::String::size ( ) const

Returns the length of the String in bytes.

Returns
The string's length.

◆ length()

SceSize sce::Json::String::length ( ) const

Returns the length of the String in bytes.

Returns
The string's length.

◆ c_str()

const char* sce::Json::String::c_str ( ) const

Returns a C style string buffer of the String.

Returns
The C string

◆ resize()

void sce::Json::String::resize ( SceSize  n)

Resizes the string to a length of n characters.

◆ compare() [1/2]

bool sce::Json::String::compare ( const char *  s) const

Compares the string to s.

Returns
true if equivalent, false if not

◆ compare() [2/2]

bool sce::Json::String::compare ( const String str) const

Compares the string to str.

Returns
true if equivalent, false if not

◆ operator+=() [1/2]

String& sce::Json::String::operator+= ( const char *  s)

Appends s to the string.

Returns
A reference to the resulting String.

◆ operator+=() [2/2]

String& sce::Json::String::operator+= ( unsigned char  c)

Appends c to the string.

Returns
A reference to the resulting String.

◆ operator==() [1/3]

bool sce::Json::String::operator== ( const char *  s) const

Compares the string to s.

Returns
true if equivalent, false if not

◆ operator==() [2/3]

bool sce::Json::String::operator== ( const String str) const

Compares the string to str.

Returns
true if equivalent, false if not

◆ operator=() [3/6]

String& sce::Json::String::operator= ( const String str)

Assignment Operator.

◆ Value() [1/10]

sce::Json::Value::Value ( )

◆ Value() [2/10]

sce::Json::Value::Value ( ValueType  type)

◆ Value() [3/10]

sce::Json::Value::Value ( SceBool  value)

◆ Value() [4/10]

sce::Json::Value::Value ( SceInt64  value)

◆ Value() [5/10]

sce::Json::Value::Value ( SceUInt64  value)

◆ Value() [6/10]

sce::Json::Value::Value ( double  value)

◆ Value() [7/10]

sce::Json::Value::Value ( const String value)

◆ Value() [8/10]

sce::Json::Value::Value ( const Array value)

◆ Value() [9/10]

sce::Json::Value::Value ( const Object value)

◆ Value() [10/10]

sce::Json::Value::Value ( const Value value)

◆ ~Value()

sce::Json::Value::~Value ( )

◆ toString()

void sce::Json::Value::toString ( String s) const

Sets s to be a string representation of the value.

Parameters
[out]s- The resultant string

◆ swap()

void sce::Json::Value::swap ( Value val)

Swaps the value with another Value.

Parameters
[in]val- The Value to swap with.

◆ clear() [3/4]

void sce::Json::Value::clear ( )

Clears the value by setting to null.

◆ count()

SceSize sce::Json::Value::count ( ) const

Returns number of children.

Returns
Number of children

◆ getType()

ValueType sce::Json::Value::getType ( ) const

Returns the ValueType of the value.

Returns
The value's type

◆ set() [1/9]

void sce::Json::Value::set ( ValueType  type)

Set the type.

Parameters
[in]type- The type to set the value to.

◆ set() [2/9]

void sce::Json::Value::set ( SceBool  value)

Set the value to a boolean.

Parameters
[in]value- New value

◆ set() [3/9]

void sce::Json::Value::set ( SceInt64  value)

Set the value to a long integer(64 bits)

Parameters
[in]value- New value

◆ set() [4/9]

void sce::Json::Value::set ( SceUInt64  value)

Set the value to an unsigned long integer(64 bits)

Parameters
[in]value- new value

◆ set() [5/9]

void sce::Json::Value::set ( double  value)

Set the value to a double precision float.

Parameters
[in]value- New value

◆ set() [6/9]

void sce::Json::Value::set ( const String value)

Set the value to a String.

Parameters
[in]value- String to copy from.

◆ set() [7/9]

void sce::Json::Value::set ( const Array value)

Set the value to an Array.

Parameters
[in]value- Array to copy from.

◆ set() [8/9]

void sce::Json::Value::set ( const Object value)

Set the value to an Object.

Parameters
[in]value- Object to copy from.

◆ set() [9/9]

void sce::Json::Value::set ( const Value value)

Set the value.

Parameters
[in]value- Value to copy from.

◆ setNullAccessCallback()

int sce::Json::Value::setNullAccessCallback ( NullAccessCallback  cb,
void *  userData 
)

Set the Value's NullAccessCallback.

Parameters
[in]cb- The callback.
[in]data- Data to pass to the callback function.
Returns
0 on success, <0 on error

◆ getRoot()

Value& sce::Json::Value::getRoot ( ) const

Returns a reference to the root Value.

Returns
The root value.

◆ getBoolean()

const SceBool& sce::Json::Value::getBoolean ( ) const

Returns a constant reference to the value.

Returns
The value. Will return false if the Value is not of type ValueType::BoolValue.

◆ getInteger()

const SceInt64& sce::Json::Value::getInteger ( ) const

Returns a constant reference to the value.

Returns
The value. Will return 0 if the Value is not of type ValueType::IntValue or ValueType::UIntValue.

◆ getUInteger()

const SceUInt64& sce::Json::Value::getUInteger ( ) const

Returns a constant reference to the value.

Returns
The value. Will return 0 if the Value is not of type ValueType::IntValue or ValueType::UIntValue.

◆ getReal()

const SceDouble& sce::Json::Value::getReal ( ) const

Returns a constant reference to the value.

Returns
The value. Will return 0 if the Value is not of type ValueType::RealValue.

◆ getString()

const String& sce::Json::Value::getString ( ) const

Returns a constant reference to the string.

Only constant functions can be used, and the string cannot be altered.
referString() is the alternative function for altering the string.

Returns
The string. Will return a garbage string if the Value is not of type ValueType::StringValue.

◆ getArray()

const Array& sce::Json::Value::getArray ( ) const

Returns a constant reference to the array.

Only constant functions can be used, and the array and its members cannot be altered.
referArray() is the alternative function for altering the array.

Returns
The array. Will return an empty array if the Value is not of type ValueType::ArrayValue.

◆ getObject()

const Object& sce::Json::Value::getObject ( ) const

Returns a constant reference to the object.

Only constant functions can be used, and the object and its members cannot be altered.
referObject() is the alternative function for altering the array.

Returns
The object. Will return an empty object if the Value is not of type ValueType::ObjectValue.

◆ getValue() [1/2]

const Value& sce::Json::Value::getValue ( SceSize  pos) const

Returns a constant reference to the value.

Only constant functions can be used, and the value cannot be altered.
referValue(SceSize) is the alternative function for altering the value.

Parameters
[in]pos- The position of the value.
Returns
The value. Will return an empty value if the it doesn't exist.

◆ getValue() [2/2]

const Value& sce::Json::Value::getValue ( const String key) const

Returns a constant reference to the value.

Only constant functions can be used, and the value cannot be altered.
referValue(const String&) is the alternative function for altering the value.

Parameters
[in]key- The key of the value.
Returns
The value. Will return an empty value if the it doesn't exist.

◆ referBoolean()

SceBool* sce::Json::Value::referBoolean ( )

Returns a pointer to the value.

Returns
The value. Will return nullptr if the Value is not of type ValueType::BoolValue.

◆ referInteger()

SceInt64* sce::Json::Value::referInteger ( )

Returns a pointer to the value.

Returns
The value. Will return nullptr if the Value is not of type ValueType::IntValue or ValueType::UIntValue.

◆ referUInteger()

SceUInt64* sce::Json::Value::referUInteger ( )

Returns a pointer to the value.

Returns
The value. Will return nullptr if the Value is not of type ValueType::IntValue or ValueType::UIntValue.

◆ referReal()

SceDouble* sce::Json::Value::referReal ( )

Returns a pointer to the value.

Returns
The value. Will return 0 if the Value is not of type ValueType::RealValue.

◆ referString()

String* sce::Json::Value::referString ( )

Returns a pointer to the string.


getString() is the alternative function for only reading the string.

Returns
The string. Will return a garbage string if the Value is not of type ValueType::StringValue.

◆ referArray()

Array* sce::Json::Value::referArray ( )

Returns a pointer to the array.


getArray() is the alternative function for only reading the array.

Returns
The array. Will return an empty array if the Value is not of type ValueType::ArrayValue.

◆ referObject()

Object* sce::Json::Value::referObject ( )

Returns a pointer to the object.


getObject() is the alternative function for only reading the object.

Returns
The object. Will return an empty object if the Value is not of type ValueType::ObjectValue.

◆ referValue() [1/2]

Value* sce::Json::Value::referValue ( SceSize  pos)

Returns a pointer to the value.


getValue(SceSize) is the alternative function for only reading the Value.

Parameters
[in]pos- The position of the value.
Returns
The value. Will return an empty value if the it doesn't exist.

◆ referValue() [2/2]

Value* sce::Json::Value::referValue ( const String key)

Returns a pointer to the value.


getValue(String&) is the alternative function for only reading the Value.

Parameters
[in]key- The key of the value.
Returns
The value. Will return an empty value if the it doesn't exist.

◆ serialize() [1/2]

int sce::Json::Value::serialize ( String s)

Serializes the data into a string in JSON format.

Parameters
[out]s- The resulting string, can be written to a file or parsed.
Returns
0 on success, <0 on error.

◆ serialize() [2/2]

int sce::Json::Value::serialize ( String str,
SerializeCallback  cb,
void *  userData 
)

Serializes the values into a string in JSON format.

Allows for a callback for the different stages in the serialization.

Parameters
[in,out]s- The resulting string, can be written to a file or parsed again.
[in]cb- Callback for the internal serialization. Can be used to format the output string, as the string is not formatted internally.
[in]userData- User defined data passed to the SerializeCallback
Returns
0 on success, <0 on error.

◆ operator[]() [1/4]

const Value& sce::Json::Value::operator[] ( const String key) const

Returns constant reference of the Value of key.

Returns
The Value.

◆ operator[]() [2/4]

const Value& sce::Json::Value::operator[] ( const char *  key) const

Returns constant reference of the Value of key.

Returns
The Value.

◆ operator[]() [3/4]

const Value& sce::Json::Value::operator[] ( SceSize  pos) const

Returns constant reference of the Value at pos.

Returns
The Value.

◆ operator=() [4/6]

Value& sce::Json::Value::operator= ( const Value value)

Assignment Operator.

◆ operator bool()

sce::Json::Value::operator bool ( ) const

◆ Pair() [1/2]

sce::Json::Object::Pair::Pair ( )

◆ Pair() [2/2]

sce::Json::Object::Pair::Pair ( const String name,
const Value value 
)

◆ ~Pair()

sce::Json::Object::Pair::~Pair ( )

◆ iterator() [3/4]

sce::Json::Object::iterator::iterator ( )

◆ iterator() [4/4]

sce::Json::Object::iterator::iterator ( const iterator iter)

◆ ~iterator() [2/2]

sce::Json::Object::iterator::~iterator ( )

◆ advance() [2/2]

void sce::Json::Object::iterator::advance ( SceSize  adv)

Advance the iterator.

Parameters
[in]adv- Number by which to advance.

◆ operator++() [3/4]

iterator& sce::Json::Object::iterator::operator++ ( int  adv)

Increment the iterator.

Parameters
[in]adv- The amount to increment it by.

◆ operator++() [4/4]

iterator& sce::Json::Object::iterator::operator++ ( )

Increment the iterator.

◆ operator*() [2/2]

Pair& sce::Json::Object::iterator::operator* ( ) const

Dereference the iterator.

Returns
A reference to the pair the iterator is currently pointing to.

◆ operator==() [3/3]

bool sce::Json::Object::iterator::operator== ( iterator  iter) const

Compare to another iterator.

Returns
true if equivalent, false otherwise.

◆ operator!=() [2/2]

bool sce::Json::Object::iterator::operator!= ( iterator  iter) const

Compare to another iterator.

Returns
true if not equivalent, false otherwise.

◆ operator->() [2/2]

Pair* sce::Json::Object::iterator::operator-> ( ) const

Access the Pair the iterator is pointing to.

◆ operator=() [5/6]

iterator& sce::Json::Object::iterator::operator= ( const iterator iter)

Assignment Operator.

◆ Object() [1/2]

sce::Json::Object::Object ( )

◆ Object() [2/2]

sce::Json::Object::Object ( const Object obj)

◆ ~Object()

sce::Json::Object::~Object ( )

◆ begin() [2/2]

iterator sce::Json::Object::begin ( ) const

Returns an iterator to the first child element.

Returns
The iterator.

◆ end() [2/2]

iterator sce::Json::Object::end ( ) const

Returns an iterator to after the last child element.

Returns
The iterator.

◆ insert() [2/2]

iterator sce::Json::Object::insert ( const Pair p)

Inserts a pair into the Object.

Parameters
[in]p- The Pair to insert.
Returns
An iterator pointing to the inserted Pair.

◆ find() [5/5]

iterator sce::Json::Object::find ( const String key)

Finds a Pair with a matching key.

Parameters
[in]key- The key to search for.
Returns
An iterator pointing to the Pair with the matching key.

◆ clear() [4/4]

void sce::Json::Object::clear ( )

Empty the object.

◆ erase() [2/2]

void sce::Json::Object::erase ( const String str)

Remove the Pair with the key str.

Parameters
[in]str- key of the Pair to remove.

◆ size() [3/3]

SceSize sce::Json::Object::size ( ) const

Gets the number of child Pairs.

◆ empty() [3/3]

bool sce::Json::Object::empty ( ) const

Is the object empty?

Returns
true if there are no child Pairs.

◆ operator[]() [4/4]

Value& sce::Json::Object::operator[] ( const String str)

Searches for a pair with a key matching str.

Returns
The corresponding value of the matching key.

◆ operator=() [6/6]

Object& sce::Json::Object::operator= ( const Object obj)

Assignment Operator.

◆ parse() [1/3]

static int sce::Json::Parser::parse ( Value val,
ParseCallback  cb,
void *  userData 
)
static

Parses user defined data using characters from a user defined callback function.

Parameters
[out]val- Reference to the value the data is written to.
[in]cb- The callback function which gives the current character.
[in]data- Data to pass to the callback function

◆ parse() [2/3]

static int sce::Json::Parser::parse ( Value val,
const char *  buf,
SceSize  size 
)
static

Parses a string buffer.

Parameters
[out]val- Reference to the Value the data is written to.
[in]buf- String buffer to parse
[in]size- Size of buf
Returns
0 on success, <0 on error.

◆ parse() [3/3]

static int sce::Json::Parser::parse ( Value val,
const char *  path 
)
static

Parse a JSON file.

Will parse until EOF.

Parameters
[out]val- Reference to the Value the data is written to.
[in]path- Path to the JSON file.
Returns
0 on success, <0 on error.