Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Commit 939a7e6

Browse files
committed
Print doubles with InvariantCulture
This fixes NumbersTest with cultures that don't use . as decimal separator. Also gets NonFiniteNumbersTest closer to goal.
1 parent 5cad260 commit 939a7e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Json5/Json5Number.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System.Globalization;
2+
13
namespace Json5
24
{
35
public class Json5Number : Json5Primitive
@@ -21,7 +23,7 @@ protected override object Value
2123

2224
internal override string ToJson5String(string space, string indent)
2325
{
24-
return this.value.ToString();
26+
return this.value.ToString(CultureInfo.InvariantCulture);
2527
}
2628

2729
public static implicit operator double(Json5Number value)

0 commit comments

Comments
 (0)