JSONValue()
语法
Result = JSONValue(#JSON)概要
Returns the value of the specified #JSON data. The type of the value can be checked with JSONType().
参数
#JSON The JSON data to return the value of.
返回值
The JSON value. The result is never 0 for a valid #JSON data.
Remarks
Every #JSON data contains exactly one JSON value (containing possibly nested values). Newly created #JSON data from CreateJSON() contains a value of type #PB_JSON_Null.
The type of the JSON value or its content can be modified with one of the following functions:
- SetJSONArray(): Change the value to an (empty) array
- SetJSONBoolean(): Change the value to a boolean
- SetJSONDouble(): Change the value to a number
- SetJSONFloat(): Change the value to a number
- SetJSONInteger(): Change the value to a number
- SetJSONNull(): Change the value to a 'null'
- SetJSONObject(): Change the value to an (empty) object
- SetJSONString(): Change the value to a string
- SetJSONQuad(): Change the value to a number
示例
ParseJSON(0, Chr(34) + "The quick brown fox jumped over the lazy dog" + Chr(34)) Debug GetJSONString(JSONValue(0))
参阅
JSONType()
已支持操作系统
所有