ExtractJSONMap()
Syntax
ExtractJSONMap(JSONValue, Map())Description
Extract members from the given JSON value of type #PB_JSON_Object into the specified Map(). The map will be resized to the number of elements contained in the JSON value.
Parameters
JSONValue The JSON value. The value must be of type #PB_JSON_Object. Map() The map to fill with the JSON elements. The map will be resized to have the same size as the JSON value. Any previous content of the map will be lost.
Return value
None.
Remarks
The extraction is performed recursively if the map has a structure type. If the JSON value contains any members that do not have the proper type to match the Map(), they will be ignored and the corresponsing map element will be left empty.
Example
Input$ = "{" + Chr(34) + "enabled" + Chr(34) + ": 1, " + Chr(34) + "displayed" + Chr(34) + ": 1, " + Chr(34) + "visible" + Chr(34) + ": 0 }" ParseJSON(0, Input$) NewMap Options() ExtractJSONMap(JSONValue(0), Options()) Debug Options("enabled") Debug Options("visible")
See Also
ExtractJSONArray(), ExtractJSONList(), ExtractJSONStructure(), InsertJSONArray(), InsertJSONList(), InsertJSONMap(), InsertJSONStructure(), SetJSONObject(), JSONType()
Supported OS
All