You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
encode_batch_patch() and encode_batch_post() (and likely anywhere else that) use jsonlite's toJSON() function. This presents a problem, as the function defaults to only allowing 4 digits of precision after the decimal place. There are many cases when that precision is necessary (like with lat/lng data).
Per this stackoverflow question the issue seems to have to do with JSON itself only supporting floats which have a maximum specificity. Even setting digits = 1000, I see truncation in your example.
jsonlite::toJSON(list(lat = 1.9993292939931929), digits = 10000)
# prints the following -- note the missing final two digits
{"lat":[1.99932929399319]}
You can set digits globally, incidentally, e.g. options(digits = 1000), but I don't think it will solve your problem.
Unfortunately, since the Airtable API only accepts JSON payloads, this is likely to persist no matter what package we use internally or what interface to the API you use.
Describe the bug
encode_batch_patch() and encode_batch_post() (and likely anywhere else that) use jsonlite's toJSON() function. This presents a problem, as the function defaults to only allowing 4 digits of precision after the decimal place. There are many cases when that precision is necessary (like with lat/lng data).
To Reproduce
Expected behavior
Preferably no precision would be lost. Consider different packages for converting to JSON or set digits to something higher.
The text was updated successfully, but these errors were encountered: