Libraries |
|
JSON serialize | Source Code |
|
|
Function Summary | |||||
string |
| ||||
string |
| ||||
string |
| ||||
void |
| ||||
string |
| ||||
string |
| ||||
string |
| ||||
string |
| ||||
string |
| ||||
dataType |
| ||||
dataType |
| ||||
void |
| ||||
dataType |
| ||||
dataType |
| ||||
dataType |
| ||||
dataType |
| ||||
dataType |
| ||||
string |
| ||||
char |
| ||||
boolean |
| ||||
dataType |
| ||||
void |
| ||||
dataType |
| ||||
void |
|
Function Detail |
declare_to_json
const proc: declare_to_json (in type: dataType)
-
Template function to declare the function toJson for dataType.
- Parameters:
- dataType - Argument type of the function toJson.
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.
parseJson
const func dataType: parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)
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.
declare_parse_json
const proc: declare_parse_json (in type: dataType, in type: parseType)
-
Template function to declare the function parseJson for dataType.
- Parameters:
- dataType - Result type of the function parseJson.
- parseType - Type specifying the source for reading symbols. Symbols can be read from a string or file.
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)
parseJson
const func dataType: parseJson (inout string: symbol, inout parseType: jsonData, attr dataType)
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)
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.
declare_from_json
const proc: declare_from_json (in type: dataType)
-
Template function to declare the function fromJson for dataType.
- Parameters:
- dataType - Result type of the function fromJson.
fromJson
const func dataType: fromJson (in var string: stri, attr dataType)
-
Convert a JSON value into a dataType value.
declare_json_serde
const proc: declare_json_serde (in type: dataType)
-
Template function to declare the functions toJson and fromJson.
- Parameters:
- dataType - Argument type of the function toJson and result type of the function fromJson.
|
|