diff --git a/jsnlog/Infrastructure/LogMessageHelpers.cs b/jsnlog/Infrastructure/LogMessageHelpers.cs index 60e8127..5993a69 100644 --- a/jsnlog/Infrastructure/LogMessageHelpers.cs +++ b/jsnlog/Infrastructure/LogMessageHelpers.cs @@ -1,6 +1,6 @@ using System; using System.Collections.Generic; -using Newtonsoft.Json; +using System.Text.Json; namespace JSNLog.Infrastructure { @@ -8,14 +8,14 @@ internal class LogMessageHelpers { public static T DeserializeJson(string json) { - T result = JsonConvert.DeserializeObject(json); + T result = JsonSerializer.Deserialize(json); return result; } public static bool IsPotentialJson(string msg) { string trimmedMsg = msg.Trim(); - return (trimmedMsg.StartsWith("{") && trimmedMsg.EndsWith("}")); + return (trimmedMsg.StartsWith("{") && trimmedMsg.EndsWith("}")); } /// @@ -71,7 +71,7 @@ public static bool IsJsonString(string msg) /// /// Takes a log message and finds out if it contains a valid JSON string. /// If so, returns it unchanged. - /// + /// /// Otherwise, surrounds the string with quotes (") and escapes the string for JavaScript. /// /// diff --git a/jsnlog/JSNLog.ClassLibrary.nuspec b/jsnlog/JSNLog.ClassLibrary.nuspec index 88f7c22..f0b4d96 100644 --- a/jsnlog/JSNLog.ClassLibrary.nuspec +++ b/jsnlog/JSNLog.ClassLibrary.nuspec @@ -1,7 +1,7 @@ - JSNLog.ClassLibrary + JSNLog.ClassLibrary 0.0.0 JSNLog.ClassLibrary - Class library for JSNLog Matt Perdeck @@ -19,7 +19,7 @@ * JSNLog * CommonLogging - a copy of JSNLog, except for the id. * JSNLog.ClassLibrary.nuspec - does not copy contents files or the readme.txt file, and does not depend on WebActivatorEx. For use in class libraries. - + The CommonLogging NuGet package and the JSNLog package have the same dependencies and files. This because CommonLogging is purely a convenience package - JSNLog already builds on Common.Logging, so it is not really needed. Only reason it is there @@ -30,9 +30,9 @@ in the other as well. --> - - + - + diff --git a/jsnlog/JSNLog.nuspec b/jsnlog/JSNLog.nuspec index c4d8637..d1fe249 100644 --- a/jsnlog/JSNLog.nuspec +++ b/jsnlog/JSNLog.nuspec @@ -1,7 +1,7 @@ - JSNLog + JSNLog 0.0.0 JSNLog - JavaScript Logging Package Matt Perdeck @@ -31,9 +31,9 @@ - - + - + diff --git a/jsnlog/jsnlog.csproj b/jsnlog/jsnlog.csproj index ed0e285..a7dc640 100644 --- a/jsnlog/jsnlog.csproj +++ b/jsnlog/jsnlog.csproj @@ -39,22 +39,19 @@ + - - - - true readme.txt - +