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

Commit

Permalink
Merge pull request #130 from WolfspiritM/dev
Browse files Browse the repository at this point in the history
Fix invalid JSON caused by localized decimal mark
  • Loading branch information
avanderhoorn authored Aug 2, 2016
2 parents 4eb28ab + 3669e5f commit c2b1e60
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit c2b1e60

Please sign in to comment.