IJsonValue 介面

定義

封裝 JSON 值。

public interface class IJsonValue
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(2736889547, 61619, 19917, 190, 238, 25, 212, 140, 211, 237, 30)]
struct IJsonValue
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(2736889547, 61619, 19917, 190, 238, 25, 212, 140, 211, 237, 30)]
public interface IJsonValue
Public Interface IJsonValue
衍生
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

屬性

ValueType

取得封裝 JSON 值的型別。 可能的型別是由 JsonValueType所定義。

方法

GetArray()

如果封裝值的 ValueTypeArray,則傳回陣列的指標。 如果不是,則會擲回例外狀況。

GetBoolean()

如果封裝值的ValueTypeBoolean,則傳回Boolean。 如果不是,則會擲回例外狀況。

GetNumber()

如果封裝值的ValueType為 Number,則會傳回Double (Double) 如果不是,則會擲回例外狀況。

GetObject()

如果封裝值的 ValueTypeObject,則傳回物件的指標。 如果不是,則會擲回例外狀況。

GetString()

如果封裝值的ValueTypeString,則會傳回String。 如果不是,則會擲回例外狀況。

Stringify()

擷取封裝值的 JSON 表示。

適用於