-Built-in converters inherit from JsonConverter

-Fixed writing null values by XmlNodeConverter and RegexConverter
-Tests
-Documentation
This commit is contained in:
James Newton-King
2017-08-12 20:17:28 +12:00
parent 0996a59f8c
commit 946b43fab8
15 changed files with 268 additions and 36 deletions
@@ -24,6 +24,7 @@
#endregion
using System;
using System.IO;
using Newtonsoft.Json.Converters;
#if DNXCORE50
using Xunit;
@@ -92,6 +93,18 @@ namespace Newtonsoft.Json.Tests.Converters
}
}
[Test]
public void WriteJsonNull()
{
StringWriter sw = new StringWriter();
JsonTextWriter jsonWriter = new JsonTextWriter(sw);
VersionConverter converter = new VersionConverter();
converter.WriteJson(jsonWriter, null, null);
StringAssert.AreEqual(@"null", sw.ToString());
}
[Test]
public void SerializeVersionClass()
{