Skip to content

Commit

Permalink
Update ExtensionMethods.cs
Browse files Browse the repository at this point in the history
Added explicit setting for TypeNameHandling in the JsonSerializerSettings to prevent overridden defaults from causing breaking changes to the MiniProfiler.
  • Loading branch information
Rob Bihun authored and NickCraver committed Dec 17, 2018
1 parent eb704c7 commit b1c485c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/MiniProfiler.Shared/Internal/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ public static string ToJson(this List<Guid> guids)
private static readonly JsonSerializerSettings defaultSettings = new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore,
TypeNameHandling = TypeNameHandling.None,
ContractResolver = new DefaultContractResolver()
};

private static readonly JsonSerializerSettings htmlEscapeSettings = new JsonSerializerSettings
{
StringEscapeHandling = StringEscapeHandling.EscapeHtml,
NullValueHandling = NullValueHandling.Ignore,
TypeNameHandling = TypeNameHandling.None,
ContractResolver = new DefaultContractResolver()
};

Expand Down

0 comments on commit b1c485c

Please sign in to comment.