ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <json.h>

List of all members.

Static Public Member Functions

static JSONValueparse (const char *data)
 Parses a complete JSON encoded string (UNICODE input version).
static String stringify (const JSONValue *value)
 Turns the passed in JSONValue into a JSON encode string.

Static Protected Member Functions

static bool skipWhitespace (const char **data)
 Skips over any whitespace characters (space, tab, or
) defined by the JSON spec.
static bool extractString (const char **data, String &str)
 Extracts a JSON String as defined by the spec - "<some chars>" Any escaped characters are swapped out for their unescaped values.
static double parseInt (const char **data)
 Parses some text as though it is an integer.
static double parseDecimal (const char **data)
 Parses some text as though it is a decimal.

Private Member Functions

 JSON ()
 Blocks off the public constructor.

Friends

class JSONValue

Detailed Description

Definition at line 149 of file json.h.


Constructor & Destructor Documentation

Common::JSON::JSON (  )  [private]

Blocks off the public constructor.

private

Definition at line 65 of file json.cpp.


Member Function Documentation

bool Common::JSON::extractString ( const char **  data,
String str 
) [static, protected]

Extracts a JSON String as defined by the spec - "<some chars>" Any escaped characters are swapped out for their unescaped values.

protected

Parameters:
char** data Pointer to a char* that contains the JSON text
String& str Reference to a String to receive the extracted string
Returns:
bool Returns true on success, false on failure

Definition at line 139 of file json.cpp.

JSONValue * Common::JSON::parse ( const char *  data  )  [static]

Parses a complete JSON encoded string (UNICODE input version).

public

Parameters:
char* data The JSON text
Returns:
JSONValue* Returns a JSON Value representing the root, or NULL on error

Definition at line 76 of file json.cpp.

double Common::JSON::parseDecimal ( const char **  data  )  [static, protected]

Parses some text as though it is a decimal.

protected

Parameters:
char** data Pointer to a char* that contains the JSON text
Returns:
double Returns the double value of the decimal found

Definition at line 254 of file json.cpp.

double Common::JSON::parseInt ( const char **  data  )  [static, protected]

Parses some text as though it is an integer.

protected

Parameters:
char** data Pointer to a char* that contains the JSON text
Returns:
double Returns the double value of the number found

Definition at line 237 of file json.cpp.

bool Common::JSON::skipWhitespace ( const char **  data  )  [static, protected]

Skips over any whitespace characters (space, tab, or
) defined by the JSON spec.

protected

Parameters:
char** data Pointer to a char* that contains the JSON text
Returns:
bool Returns true if there is more data, or false if the end of the text was reached

Definition at line 121 of file json.cpp.

String Common::JSON::stringify ( const JSONValue value  )  [static]

Turns the passed in JSONValue into a JSON encode string.

public

Parameters:
JSONValue* value The root value
Returns:
String Returns a JSON encoded string representation of the given value

Definition at line 105 of file json.cpp.


Friends And Related Function Documentation

friend class JSONValue [friend]

Definition at line 150 of file json.h.


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


Generated on Sat Sep 14 2019 05:03:59 for ResidualVM by doxygen 1.7.1
curved edge   curved edge