Skip to content

Commit 3c253d4

Browse files
committed
Remove incorrect regional guard in ParseNumber
Fixes #10
1 parent cf14f91 commit 3c253d4

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

JsonConverter.bas

+1-3
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,7 @@ Private Function json_ParseNumber(json_String As String, ByRef json_Index As Lon
462462
If json_ConvertLargeNumbersToString And Len(json_Value) >= 16 Then
463463
json_ParseNumber = json_Value
464464
Else
465-
' Guard for regional settings that use "," for decimal
466-
' CStr(0.1) -> "0.1" or "0,1" based on regional settings -> Replace "." with "." or ","
467-
json_Value = VBA.Replace(json_Value, ".", VBA.Mid$(VBA.CStr(0.1), 2, 1))
465+
' VBA.Val does not use regional settings, so guard for comma is not needed
468466
json_ParseNumber = VBA.Val(json_Value)
469467
End If
470468
Exit Function

specs/VBA-JSON - Specs.xlsm

-227 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)