Skip to content

Commit 6d49f71

Browse files
authored
Merge pull request #1267 from json-api-dotnet/fix-runtime-type-converter
Use deterministic culture when converting to string
2 parents 9a2f364 + db852cf commit 6d49f71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsonApiDotNetCore.Annotations/Resources/Internal/RuntimeTypeConverter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static class RuntimeTypeConverter
4646
return value;
4747
}
4848

49-
string? stringValue = value.ToString();
49+
string? stringValue = value is IFormattable cultureAwareValue ? cultureAwareValue.ToString(null, cultureInfo) : value.ToString();
5050

5151
if (string.IsNullOrEmpty(stringValue))
5252
{

0 commit comments

Comments
 (0)