|
<< Click to Display Table of Contents >> JSON library |
![]() ![]()
|
jsoncreate(Input1) - create JSON object. Input1 contains name of the JSON object.
Example:
jsoncreate("json");
jsontostring(Input1) - stringify JSON object. Input1 contains name of the JSON object.
Example:
jsontostring("json");
jsonfromstring(Input1, Input2) - convert string in Input2 into JSON object with name in Input1.
Example:
jsonfromstring("json", "{'string':'Hello world','int':12,'long':23342424,'double':34.2,'bool':false}");
jsonaddstring(Input1, Input2, Input3) - Add string parameter into JSON. Input1 contains name of the JSON object. Input2 contains key of the JSON parameter. Input3 contains value of the parameter.
Example:
jsonaddstring("json", "string", "Hello world" );
jsonaddint(Input1, Input2, Input3) - Add int parameter into JSON. Input1 contains name of the JSON object. Input2 contains key of the JSON parameter. Input3 contains value of the parameter.
Example:
jsonaddint("json", "int", 24);
jsonaddlong(Input1, Input2, Input3) - Add long parameter into JSON. Input1 contains name of the JSON object. Input2 contains key of the JSON parameter. Input3 contains value of the parameter.
Example:
jsonaddlong("json", "long", 248786755);
jsonadddouble(Input1, Input2, Input3) - Add double parameter into JSON. Input1 contains name of the JSON object. Input2 contains key of the JSON parameter. Input3 contains value of the parameter.
Example:
jsonadddouble("json", "double", 34.2);
jsonaddbool(Input1, Input2, Input3) - Add bool parameter into JSON. Input1 contains name of the JSON object. Input2 contains key of the JSON parameter. Input3 contains value of the parameter.
Example:
jsonaddbool("json", "bool", true);
jsongetstring(Input1, Input2, Input3) - Get string parameter from JSON. Input1 contains name of the JSON object. Input2 contains key of the JSON parameter. Input3 contains default return value if the parameter is no available.
Example:
string str = jsongetstring("json", "string", "Hello world" );
jsongetint(Input1, Input2, Input3) - Get int parameter from JSON. Input1 contains name of the JSON object. Input2 contains key of the JSON parameter. Input3 contains default return value if the parameter is no available.
Example:
int integer = jsongetint("json", "int", 24);
jsongetlong(Input1, Input2, Input3) - Get long parameter from JSON. Input1 contains name of the JSON object. Input2 contains key of the JSON parameter. Input3 contains default return value if the parameter is no available.
Example:
long longvalue = jsongetlong("json", "long", 248786755);
jsongetdouble(Input1, Input2, Input3) - Get double parameter from JSON. Input1 contains name of the JSON object. Input2 contains key of the JSON parameter. Input3 contains default return value if the parameter is no available.
Example:
double doublevalue = jsongetdouble("json", "double", 34.2);
jsongetbool(Input1, Input2, Input3) - Get bool parameter from JSON. Input1 contains name of the JSON object. Input2 contains key of the JSON parameter. Input3 contains default return value if the parameter is no available.
Example:
bool booleanvalue = jsongetbool("json", "bool", true);
jsoncreatearray(Input1) - create JSON array object. Input1 contains name of the JSON array object.
Example:
jsoncreatearray("jsonarray");
jsonarraytostring(Input1) - stringify JSON array object. Input1 contains name of the JSON array object.
Example:
jsonarraytostring("jsonarray");
jsonarrayfromstring(Input1, Input2) - convert string in Input2 into JSON array object with name in Input1.
Example:
jsonarrayfromstring("jsonarray", "[{'string':'Hello world','int':12,'long':23342424,'double':34.2,'bool':false},{'string':'Hello world','int':1,'long':23342424,'double':34.2,'bool':false]");
jsonaddobjecttoarray(Input1, Input2) - add JSON object into JSON array object. Input1 contains name of the JSON array object. Input2 contains name of the JSON object.
Example:
jsonaddobjecttoarray("jsonarray", "json");
jsonaddobjectstringtoarray(Input1, Input2) - add JSON object in string format into JSON array object. Input1 contains name of the JSON array object. Input2 contains JSON object in string format.
Example:
jsonaddobjectstringtoarray("jsonarray", "{'string':'Hello world','int':12,'long':23342424,'double':34.2,'bool':false}");
jsongetobjectfromarray(Input1, Input2, Input3) - get JSON object from JSON array object. Input1 contains name of the JSON array object. Input2 contains name of the JSON object. Input3 contains index of the array.
Example:
jsongetobjectfromarray("jsonarray", "json", 2);
jsonarraysize(Input1) - return size of the JSON array object. Input1 contains name of the JSON array object.
Example:
int size = jsonarraysize("jsonarray");
jsonremovefromarray(Input1, Input2) - remove element from the JSON array. Input1 contains name of the JSON array object. Input2 contains index of the removed element.
Example:
jsonremovefromarray("jsonarray", 1);
jsoncleararray(Input1) - clear JSON array. Input1 contains name of the JSON array object.
Example:
jsoncleararray("jsonarray");
jsonaddarray(Input1, Input2, Input3) - add JSON array object into JSON object. Input1 contains name of the JSON object. Input2 contains name of the key. Input3 contains of the added JSON array object.
Example:
jsonaddarray("json2", "array", "jsonarray2");
jsongetarray(Input1, Input2, Input3) - get JSON array object from JSON object. Input1 contains name of the JSON object. Input2 contains name of the key. Input3 contains name of the JSON array object where element will be placed.
Example:
jsongetarray("json2", "array", "jsonarray3");
jsoncopy(Input1, Input2) - copy JSON object. Input1 contains name of the source JSON object. Input2 contains name of the destination JSON object.
Example:
jsoncopy("json", "json3");
jsoncopyarray(Input1, Input2) - copy JSON array object. Input1 contains name of the source JSON array object. Input2 contains name of the destination JSON array object.
Example:
jsoncopyarray("jsonarray", "jsonarray3");
calculatehmacmd5(Input1, Input2) - generate HMAC-md5 signature . Input1 contains message. Input2 contains secret word.
Example:
calculatehmacmd5("{'string':'Hello world','int':12,'long':23342424,'double':34.2,'bool':false}", "secretword");
calculatehmacsha1(Input1, Input2) - generate HMAC-sha1 signature . Input1 contains message. Input2 contains secret word.
Example:
calculatehmacsha1("{'string':'Hello world','int':12,'long':23342424,'double':34.2,'bool':false}", "secretword");
calculatehmacsha256(Input1, Input2) - generate HMAC-sha256 signature . Input1 contains message. Input2 contains secret word.
Example:
calculatehmacsha256("{'string':'Hello world','int':12,'long':23342424,'double':34.2,'bool':false}", "secretword");
calculatehmacsha384(Input1, Input2) - generate HMAC-sha384 signature . Input1 contains message. Input2 contains secret word.
Example:
calculatehmacsha384("{'string':'Hello world','int':12,'long':23342424,'double':34.2,'bool':false}", "secretword");
calculatehmacsha512(Input1, Input2) - generate HMAC-sha512 signature . Input1 contains message. Input2 contains secret word.
Example:
calculatehmacsha512("{'string':'Hello world','int':12,'long':23342424,'double':34.2,'bool':false}", "secretword");