mergJSONDecode |
Type | function |
Dictionary | LCS |
Library | LiveCode Script |
Syntax | mergJSONDecode(<pJSON>, <pVariableName>)
|
Associations | mergjson |
Summary | The function decodes JSON to an array.
|
Introduced | 8.0 |
OS | ios, android, linux, mac, windows |
Platforms | mobile, desktop, server |
Parameters | Name | Type | Description |
---|
pJSON | | The UTF8 encoded JSON to decode.
|
pVariableName | | The name of the variable to decode the JSON into.
|
|
Example | function JSONToArray pJSON
local tArray,tKeys
repeat for each line tKey in mergJSONDecode(pJSON,"tArray")
put JSONToArray(tArray[tKey]) into tArray[tKey]
end repeat
return tArray
end JSONToArray
|
Values | Name | Type | Description |
---|
return | | A list of array keys that must be further decoded. As the externals
interface can not deal with multi-dimensional arrays a recursive function must
be used to decode deeply nested JSON.
|
|
Description | The function decodes JSON to an array.
|
Tags | externals |