• Decimal point instead of decimal comma in JSONReader.GetNumericValue

    By Milos Lapis 1 decade ago

    Hello, There is a problem with a custom decimal symbol in regional setting in Windows and using JSONReader parser. This is an another variation of already reported problem "Decimal comma instead of decimal point in JSONWriter.AppendValue" from 7.9.2009. If Windows is using comma decimal separator insted of point then the function GetNumericValue in JSONReader has a problem because the following underlined code: If bIsFloatingPoint Then

     GetNumericValue = Cdbl(sReturn)Else

     GetNumericValue = Clng(sReturn)

    End If has expected the variable "sReturn" with something like "45,67" and not "45.67" which is of course a correct value from JSON string. There will be probably necessary to find what is a decimal separator in Windows first and then eventually replace it before calling Cdbl function. Milos Lapis MLC 

    • RE: Decimal Point

      By Troy Reimer 1 decade ago

      Hello,

       
      Could you post an example of the input JSON you are using and the output you would expect?  Thanks.
       
      Troy

  • Nevermind. I figured it out. <eom>

    By Troy Reimer 1 decade ago


    • Thank you,the problem is solved

      By Milos Lapis 1 decade ago

      Thanks a lot for adding support for international decimal separators.

       
      Milos Lapis 
      MLC