-
Notifications
You must be signed in to change notification settings - Fork 609
Description
Describe the bug
When querying features that have fields with BigInt values, the JSON response returns them in their numerical form instead of a stringified version.
Even though I wish this was not the case, the JSON specification unfortunately does not cover BigInts, resulting in precision loss (usually the last 2-3 digits) when parsing Tile38's responses.
To Reproduce
SET USER 1 FIELD bigintfield 385189776128479232 POINT 0 0
GET USER 1 WITHFIELDS
Tile38 response (string)
{"ok":true,"object":{"type":"Point","coordinates":[0,0]},"fields":{"bigintfield":385189776128479232}}
JSON parsed (JS object)
{"ok":true,"object":{"type":"Point","coordinates":[0,0]},"fields":{"bigintfield":385189776128479200}}
This behavior is consistent across all GET output formats (OBJECT/POINT/BOUNDS)
Expected behavior
Tile38 should stringify BigInt fields when the OUTPUT mode is set to JSON.