/// <summary> /// Renders the parameter <see cref="MiniProfiler"/> to json. /// </summary> public static string ToJson(MiniProfiler profiler) { if (profiler == null) { return(null); } profiler.OnDeserialized(default(StreamingContext)); //Added var result = JsonSerializer.SerializeToString(profiler); return(result); }