ExtractJSONMap()
语法
ExtractJSONMap(JSONValue, Map())概要
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.
参数
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.
返回值
无.
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.
示例
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")
参阅
ExtractJSONArray(), ExtractJSONList(), ExtractJSONStructure(), InsertJSONArray(), InsertJSONList(), InsertJSONMap(), InsertJSONStructure(), SetJSONObject(), JSONType()
已支持操作系统
所有