Json.Decode 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Decode(String) |
将 JavaScript 对象表示法 (JSON) 格式的数据转换为数据对象。 |
Decode(String, Type) |
将 JavaScript 对象表示法 (JSON) 格式的数据转换为指定类型的数据对象。 |
Decode<T>(String) |
将 JavaScript 对象表示法 (JSON) 格式的数据转换为指定的强类型数据列表。 |
Decode(String)
Decode(String, Type)
将 JavaScript 对象表示法 (JSON) 格式的数据转换为指定类型的数据对象。
public static dynamic Decode (string value, Type targetType);
static member Decode : string * Type -> obj
Public Shared Function Decode (value As String, targetType As Type) As Object
参数
- value
- String
要转换的 JSON 编码字符串。
- targetType
- Type
数据应转换为的类型 value
。
返回
已转换为指定类型的 JSON 编码数据。
适用于
Decode<T>(String)
将 JavaScript 对象表示法 (JSON) 格式的数据转换为指定的强类型数据列表。
public static T Decode<T> (string value);
static member Decode : string -> 'T
Public Shared Function Decode(Of T) (value As String) As T
类型参数
- T
要将 JSON 数据转换为的强类型列表的类型。
参数
- value
- String
要转换的 JSON 编码字符串。
返回
T
已转换为强类型列表的 JSON 编码数据。