Libraries
JSON serialize Source Code
 previous   up   next 

Function Summary
string
toJson (in string: stri)
Convert a string into a JSON string literal.
string
toJson (in char: ch)
Convert a char into a JSON string literal.
string
toJson (in boolean: okay)
Convert a boolean into a JSON boolean literal.
string
toJson (in dataType: dataArray)
Convert an array into a JSON array value.
string
toJson (in dataType: dataHash)
Convert a hash into a JSON object value.
string
toJson (in dataType: dataSet)
Convert a set into a JSON array value.
string
toJson (in dataType: dataEnum)
Convert an enumeration into a JSON integer literal.
string
toJson (in dataType: dataStruct)
Convert a struct into a JSON object value.
string
fromJson (in var string: stri, attr string)
Convert a JSON string literal into a string.
char
fromJson (in var string: stri, attr char)
Convert a JSON string literal into a char.
boolean
fromJson (in var string: stri, attr boolean)
Convert a JSON boolean literal into a boolean.
dataType
fromJson (in string: symbol, attr dataType)
Convert a JSON number literal into an integer, bigInteger or float.
dataType
fromJson (in var string: stri, attr dataType)
Convert a JSON value into a dataType value.
dataType
parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)
Parse a JSON boolean literal into a boolean.
dataType
parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)
Parse a JSON dataType value into a dataType value.
dataType
parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)
Parse a JSON array value into an array.
dataType
parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)
Parse a JSON object value into a hash.
dataType
parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)
Parse a JSON array value into a set.
dataType
parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)
Parse a JSON integer or string literal into an enumeration.
dataType
parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)
Parse a JSON object value into a struct.

Function Detail

toJson

const func string: toJson (in string: stri)

Convert a string into a JSON string literal.


toJson

const func string: toJson (in char: ch)

Convert a char into a JSON string literal.


toJson

const func string: toJson (in boolean: okay)

Convert a boolean into a JSON boolean literal.


toJson

const func string: toJson (in dataType: dataArray)

Convert an array into a JSON array value.


toJson

const func string: toJson (in dataType: dataHash)

Convert a hash into a JSON object value.


toJson

const func string: toJson (in dataType: dataSet)

Convert a set into a JSON array value.


toJson

const func string: toJson (in dataType: dataEnum)

Convert an enumeration into a JSON integer literal.


toJson

const func string: toJson (in dataType: dataStruct)

Convert a struct into a JSON object value.


fromJson

const func string: fromJson (in var string: stri, attr string)

Convert a JSON string literal into a string.


fromJson

const func char: fromJson (in var string: stri, attr char)

Convert a JSON string literal into a char.


fromJson

const func boolean: fromJson (in var string: stri, attr boolean)

Convert a JSON boolean literal into a boolean.


fromJson

const func dataType: fromJson (in string: symbol, attr dataType)

Convert a JSON number literal into an integer, bigInteger or float.


fromJson

const func dataType: fromJson (in var string: stri, attr dataType)

Convert a JSON value into a dataType value.


parseJson

const func dataType: parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)

Parse a JSON boolean literal into a boolean.

Parameters:
symbol - The current symbol to be parsed.
jsonData - Source from which getJsonSymbol obtains the next symbols.
Returns:
the boolean obtained from symbol and jsonData.

parseJson

const func dataType: parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)

Parse a JSON dataType value into a dataType value.

Parameters:
symbol - The current symbol to be parsed.
jsonData - Source from which getJsonSymbol obtains the next symbols.
Returns:
the dataType value obtained from symbol and jsonData.

parseJson

const func dataType: parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)

Parse a JSON array value into an array.

Parameters:
symbol - The current symbol to be parsed.
jsonData - Source from which getJsonSymbol obtains the next symbols.
Returns:
the array obtained from symbol and jsonData.

parseJson

const func dataType: parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)

Parse a JSON object value into a hash.

Parameters:
symbol - The current symbol to be parsed.
jsonData - Source from which getJsonSymbol obtains the next symbols.
Returns:
the hash obtained from symbol and jsonData.

parseJson

const func dataType: parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)

Parse a JSON array value into a set.

Parameters:
symbol - The current symbol to be parsed.
jsonData - Source from which getJsonSymbol obtains the next symbols.
Returns:
the set obtained from symbol and jsonData.

parseJson

const func dataType: parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)

Parse a JSON integer or string literal into an enumeration.

Parameters:
symbol - The current symbol to be parsed.
jsonData - Source from which getJsonSymbol obtains the next symbols.
Returns:
the enumeration value obtained from symbol and jsonData.

parseJson

const func dataType: parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)

Parse a JSON object value into a struct.

Parameters:
symbol - The current symbol to be parsed.
jsonData - Source from which getJsonSymbol obtains the next symbols.
Returns:
the struct obtained from symbol and jsonData.


 previous   up   next