Difference between revisions of "LlJson2List"
Jump to navigation
Jump to search
Kelly Linden (talk | contribs) (Created page with "{{LSL Function |func_id=|func_sleep=0.0|func_energy=10.0 |func=llJson2List|return_type=list|p1_type=string|p1_name=src |func_footnote= To convert a list into a json formatted str…") |
m |
||
Line 23: | Line 23: | ||
|permission | |permission | ||
|negative_index | |negative_index | ||
|sort= | |sort=Json2List | ||
|cat1=List | |cat1=List | ||
|cat2=String | |cat2=String | ||
|cat3=Data Conversion | |cat3=Data Conversion | ||
|cat4= | |cat4=JSON | ||
}} | }} |
Revision as of 11:47, 13 June 2013
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: list llJson2List( string src );? | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
This function takes a string representing JSON, and returns a list of the top level.
Returns a list made by parsing src, a string representing json.
• string | src |
To convert a list into a json formatted string use llList2Json.
Specification
- If the json represents a single item (number, string, true, false or null) then a list with 1 item will be returned.
- If the json represents an object then a strided list of key, value pairs is returned. All values that are objects or arrays are returned as json strings.
- If the json represents an array then a list of all items is returned. All values that are objects or arrays are returned as json strings.