zanders3/json

Lose Precision when parsing Int, long & float

Closed this issue · 2 comments

Example : when parsing1577999999 it will give 1577800000

Closing due to not enough info. Could you provide more information? e.g. a sample json file or ideally a c# test case.

this is a bug. values greater than 2^31 are not parsed correctly. they are returned as 0
I found this bug in jasonparser.cs line 295/296.
I solved this by replacing int with long.
Should be considered in next release.