libjson converts doubles to strings with low precision
|Reported by:||molnar||Owned by:||warmerdam|
"%f" as conversion format for
snprintf(). This defaults to a precision of 6 digits, which can result in loss of precision for many doubles.
This situation has been improved in the most recent release of json-c (In case it's interesting, here is the commit: https://github.com/json-c/json-c/commit/06450206c4f3de4af8d81bb6d93e9db1d5fedec1 and the discussion: https://github.com/json-c/json-c/pull/59).
For my own purposes, it is easy to patch around this issue by incorporating a few lines of code from v0.12 json-c. I just thought I'd bring it to the attention of the GDAL/OGR maintainers.
PS. In case it is of interest: this issue was discovered while round-tripping data to/from Elasticsearch.