This function takes a string representing JSON, and returns a list of the top level.
list llJson2List( string src );
Forced delay: 0.0 seconds. Energy: 10.0.
To convert a list into a json formatted string use llList2Json.
Returns a list made by parsing src, a string representing json.
default
{
state_entry()
{
list items;
string value = "89556747-24cb-43ed-920b-47caed15465f";
items = llJson2List(value);
// ["89556747-24cb-43ed-920b-47caed15465f"]
string object = "{\"pi\": 3.14, \"set\": [1,2,3], \"status\": \"ok\"}";
items = llJson2List(object);
// ["pi", 3.140000, "set", "[1,2,3]", "status", "ok"]
string array = "[0, 3.14, [1,2,3], {}]";
items = llJson2List(array);
// [0, 3.140000, "[1,2,3]", "{}"]
}
}
Date of Release 20/05/2013