All Products
Search
Document Center

Blockchain as a Service:JSON and XML Parsing Library

Last Updated:Jul 29, 2024

property_parse

The JSON and XML parsing functions that are mainly used to parse the JSON format.

Function

property_parse(string property_value, int property_type) returns(uint result);

Request parameters

Name Required Type Description
property_value Yes string The data in the JSON format.
property_type Yes int The parsing type. 0 refers to the JSON format and 1 refers to the XML format.

Response parameters

Name Required Type Description
result Yes uint The return value of the parse function.

property_destroy

Deletes the return value of the parse function.

Function

property_destroy(uint hanlder) returns(bool result);

Request parameters

Name Required Type Description
handler Yes uint The return value of the parse function.

Response parameters

Name Required Type Description
result Yes bool The return value of the method. A value of true indicates that the method is called. A value of false indicates that the call has failed.

property_get_bool

Obtains node values ​​of the bool type from the return value of the parse function.

Function

property_get_bool(uint hanlder, string path) returns(int result,bool data);

Request parameters

Name Required Type Description
handler Yes uint The return value of the parse function.
path Yes string The location of the parsed property.

Response parameters

Name Required Type Description
result Yes int The return value of the method. A value of 1 indicates that the method is called. A value of 0 indicates that the call has failed.
data Yes bool The value of the path node.

property_get_int

Parses node values ​​of the int type in JSON and XML.

Function

property_get_int(uint hanlder, string path) returns(int result,int data);

Request parameters

Name Required Type Description
handler Yes uint The return value of the parse function.
path Yes string The location of the parsed property.

Response parameters

Name Required Type Description
result Yes int The return value of the method. A value of 1 indicates that the method is called. A value of 0 indicates that the call has failed.
data Yes bool The value of the path node.

property_get_uint

Parses node values ​​of the uint type in JSON and XML.

Function

property_get_uint(uint hanlder, string path) returns(int result, uint data);

Request parameters

Name Required Type Description
handler Yes uint The return value of the parse function.
path Yes string The location of the parsed property.

Response parameters

Name Required Type Description
result Yes int The return value of the method. A value of 1 indicates that the method is called. A value of 0 indicates that the call has failed.
data Yes bool The value of the path node.

property_get_string

Parses node values ​​of the string type in JSON and XML.

Function

property_get_string(uint hanlder, string path) returns(int result,string memory);

Request parameters

Name Required Type Description
handler Yes uint The return value of the parse function.
path Yes string The location of the parsed property.

Response parameters

Name Required Type Description
result Yes int The return value of the method. A value of 1 indicates that the method is called. A value of 0 indicates that the call has failed.
data Yes bool The value of the path node.

property_set_bool

Creates data in JSON and XML, and inserts data of the bool type.

Function

property_set_bool(uint hanlder,string path, bool data) returns(bool result);

Request parameters

Name Required Type Description
handler Yes uint The return value of the parse function.
path Yes string The path of the data to be set.
data Yes bool The value of the data to be set.

Response parameters

Name Required Type Description
result Yes bool The return value of the method. A value of true indicates that the method is called. A value of false indicates that the call has failed.

property_set_int

Creates data in JSON and XML, and inserts data of the int type.

Function

property_set_int(uint hanlder, string path, int data) returns(bool result);

Request parameters

Name Required Type Description
handler Yes uint The return value of the parse function.
path Yes string The path of the data to be set.
data Yes int The value of the data to be set.

Response parameters

Name Required Type Description
result Yes bool The return value of the method. A value of true indicates that the method is called. A value of false indicates that the call has failed.

property_set_uint

Creates data in JSON and XML, and inserts data of the uint type.

Function

property_set_int(uint hanlder, string path, uint data) returns(bool result);

Request parameters

Name Required Type Description
handler Yes uint The return value of the parse function.
path Yes string The path of the data to be set.
data Yes uint The value of the data to be set.

Response parameters

Name Required Type Description
result Yes bool The return value of the method. A value of true indicates that the method is called. A value of false indicates that the call has failed.

property_set_string

Creates data in JSON and XML, and inserts data of the string type.

Function

property_set_string(uint hanlder, string path, val data) returns(bool result);

Request parameters

Name Required Type Description
handler Yes uint The return value of the parse function.
path Yes string The path of the data to be set.
data Yes val The value of the data to be set.

Response parameters

Name Required Type Description
result Yes bool The return value of the method. A value of true indicates that the method is called. A value of false indicates that the call has failed.