I am reading some JSON using WEBLib.JSON - a snippet of the JSON containing the pair that causes a problem ("FMax":1e50) is shown below:
Reading progresses well until fMax. I have traced the problem into WEBLib.JSON in the procedure procedure TJSONNumber.SetStrValue(const Value: string);
Line 636 execute fine but line 639 FInt := StrToInt(Value) raises an exception because Value is indeed out of range for an integer... the problem is that it is intended to be a double.... I think that there needs to be some range checking before attempting StrToInt...
As the procedure stands it limits the range of double to the range of integer
I read the same JSON with System.JSON and have no such problems. [I am using the same code conditionally defining WebLib.JSON or System.JSON depending on the target platform] .
Am I missing something elementary?