JSONObject.ParseJSONValue does not differentiate data types

Unlike the VCL counterpart, the WEBLib JSONObject.ParseJSONValue doesn't seem to differentiate data types. Every end node value is a TJSONValue, where the VCL version creates TJSONString, TJSONNumber, TJSONBoolean. This has following drawbacks:

  • I have to convert the values myself using StrToInt and StrToFloat and testing on true or false.
  • When writing the tree as text, all values are strings, which is incorrect.
  • No common coding possible for VCL and web applications.

We have improved ParseJSONValue so it will return the different TJSONxxx object types.
This will be included in the next update.

1 Like