UserActivityContentInfo.FromJson(String) 方法

定义

从 JSON 字符串创建 UserActivityContentInfo

public:
 static UserActivityContentInfo ^ FromJson(Platform::String ^ value);
 static UserActivityContentInfo FromJson(winrt::hstring const& value);
public static UserActivityContentInfo FromJson(string value);
function fromJson(value)
Public Shared Function FromJson (value As String) As UserActivityContentInfo

参数

value
String

Platform::String

winrt::hstring

要以 JSON 格式存储的内容。

返回

包含 JSON 数据的 UserActivityContentInfo

示例

userActivity.ContentInfo = UserActivityContentInfo.FromJson(
    @"{
    ""@context"": ""~~http~~://schema.org"",
    ""@type"": ""Article"",
    ""author"": ""John Doe"",
    ""name"": ""How to Tie a Reef Knot""
    }");

适用于