From b1c485c5c5883a777ce663419feeeeffaad3c7e9 Mon Sep 17 00:00:00 2001 From: Rob Bihun Date: Mon, 17 Dec 2018 14:14:29 -0600 Subject: [PATCH] Update ExtensionMethods.cs Added explicit setting for TypeNameHandling in the JsonSerializerSettings to prevent overridden defaults from causing breaking changes to the MiniProfiler. --- src/MiniProfiler.Shared/Internal/ExtensionMethods.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/MiniProfiler.Shared/Internal/ExtensionMethods.cs b/src/MiniProfiler.Shared/Internal/ExtensionMethods.cs index 49e9ea772..529d3f15a 100644 --- a/src/MiniProfiler.Shared/Internal/ExtensionMethods.cs +++ b/src/MiniProfiler.Shared/Internal/ExtensionMethods.cs @@ -79,6 +79,7 @@ public static string ToJson(this List guids) private static readonly JsonSerializerSettings defaultSettings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, + TypeNameHandling = TypeNameHandling.None, ContractResolver = new DefaultContractResolver() }; @@ -86,6 +87,7 @@ public static string ToJson(this List guids) { StringEscapeHandling = StringEscapeHandling.EscapeHtml, NullValueHandling = NullValueHandling.Ignore, + TypeNameHandling = TypeNameHandling.None, ContractResolver = new DefaultContractResolver() };