Allow passing null to JsonArray.Add() (dotnet/corefx#25104)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 8 Nov 2017 05:50:42 +0000 (06:50 +0100)
committerStephen Toub <stoub@microsoft.com>
Wed, 8 Nov 2017 05:50:42 +0000 (00:50 -0500)
commit19adb44596c2fc8f61c4ca22e03f62690a417e72
tree8b0c4e4d2ea1a8ffb5dcaaf3ddd477d329e02cf1
parent95facebb28f3557f908b2a4d2e005ea1f714ca3f
Allow passing null to JsonArray.Add() (dotnet/corefx#25104)

* Allow passing null to JsonArray.Add()

null is a valid value in a JSON array, so there is no reason to forbid
adding null to the array.

JsonArray.Save() already handles null values in the array.

* Fix JsonArray test

Commit migrated from https://github.com/dotnet/corefx/commit/c0718f870f12493f8359a95443362ee208aeb8a0
src/libraries/System.Json/src/System/Json/JsonArray.cs
src/libraries/System.Json/tests/JsonArrayTests.cs
src/libraries/System.Json/tests/JsonValueTests.cs