Sure. Let's assume the following small JSON:
{ "id": 1130950371172638721, "id_str": "1130950371172638721" }
(hint, these are values from a Tweet object in the Twitter API)
Now, let's parse this with jq:
$ jq < simple.json { "id": 1130950371172638700, "id_str": "1130950371172638721" }
The large integer value is mangled, because JavaScript (jQuery) does not like values larger than 53 bits. This is the reason that Twitter ended up serving IDs as both integer values and as strings (read more here)
Well every day is a learning day. I didn't know C had the same issues as JS with integer parsing.
Thanks for clarifying.
I guess this issue is relevant here:
github.com/stedolan/jq/issues/369
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Sure. Let's assume the following small JSON:
(hint, these are values from a Tweet object in the Twitter API)
Now, let's parse this with jq:
The large integer value is mangled, because JavaScript (jQuery) does not like values larger than 53 bits. This is the reason that Twitter ended up serving IDs as both integer values and as strings (read more here)
Well every day is a learning day. I didn't know C had the same issues as JS with integer parsing.
Thanks for clarifying.
I guess this issue is relevant here:
github.com/stedolan/jq/issues/369