Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Fix invalid JSON caused by localized decimal mark #130

Merged
merged 1 commit into from
Aug 2, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Globalization;
using Newtonsoft.Json;

namespace Glimpse.Internal
Expand All @@ -15,7 +16,7 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s
result = Math.Round(convertedNullable.Value.TotalMilliseconds, 2);
}

writer.WriteRawValue(result.ToString());
writer.WriteRawValue(result.ToString(CultureInfo.InvariantCulture));
}

public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Expand Down