Dela via


JsonObject.Insert(String, IJsonValue) Method

Definition

Adds a new entry to the JsonObject.

public:
 virtual bool Insert(Platform::String ^ key, IJsonValue ^ value) = IMap<Platform::String ^, IJsonValue ^>::Insert;
bool Insert(winrt::hstring const& key, IJsonValue const& value);
public bool Insert(string key, IJsonValue value);
function insert(key, value)
Public Function Insert (key As String, value As IJsonValue) As Boolean

Parameters

key
String

Platform::String

winrt::hstring

The key to insert.

value
IJsonValue

The IJsonValue to insert.

Returns

Boolean

bool

true if calling the method replaced a value that already existed for the key; false if calling the method defined a new key.

Implements

Applies to