From a189fc26ea35b8ad77bd3be2bceac5c2996149a8 Mon Sep 17 00:00:00 2001 From: Oluwatoni Solarin-Sodara Date: Thu, 12 Jul 2018 01:16:18 +0100 Subject: [PATCH] replace Jil with Newtonsoft.Json --- src/coverlet.core/CoverageResult.cs | 2 -- src/coverlet.core/Reporters/JsonReporter.cs | 9 ++------- src/coverlet.core/coverlet.core.csproj | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/coverlet.core/CoverageResult.cs b/src/coverlet.core/CoverageResult.cs index dc70d9c79..9f176ae61 100644 --- a/src/coverlet.core/CoverageResult.cs +++ b/src/coverlet.core/CoverageResult.cs @@ -1,8 +1,6 @@ using System.Collections.Generic; using System.IO; -using Jil; - namespace Coverlet.Core { public class BranchInfo diff --git a/src/coverlet.core/Reporters/JsonReporter.cs b/src/coverlet.core/Reporters/JsonReporter.cs index 951e0128e..ae5cd51de 100644 --- a/src/coverlet.core/Reporters/JsonReporter.cs +++ b/src/coverlet.core/Reporters/JsonReporter.cs @@ -1,5 +1,4 @@ -using System.IO; -using Jil; +using Newtonsoft.Json; namespace Coverlet.Core.Reporters { @@ -11,11 +10,7 @@ public class JsonReporter : IReporter public string Report(CoverageResult result) { - using (var writer = new StringWriter()) - { - JSON.Serialize(result.Modules, writer, Options.PrettyPrint); - return writer.ToString(); - } + return JsonConvert.SerializeObject(result.Modules, Formatting.Indented); } } } \ No newline at end of file diff --git a/src/coverlet.core/coverlet.core.csproj b/src/coverlet.core/coverlet.core.csproj index f14b73dd3..965e4aa89 100644 --- a/src/coverlet.core/coverlet.core.csproj +++ b/src/coverlet.core/coverlet.core.csproj @@ -6,8 +6,8 @@ - +