jansson
jansson copied to clipboard
Create the json_uint_t type that is mapping to unsigned long long.
Use it when loading a JSON number and json_strtoint returns ERANGE and the number is positive. Only falling back on the new type as a last resort only before issuing a parsing error ensure minimal breakage in backward compatibility.
I am sure that if the pull request is viable, few more things would need to be added. I just added the bare minimum that I needed to fix my problem and for testing the water for the interest for the idea.
I feel this is a cumbersome approach to get essentially one more bit of integer precision. Maybe we should finally land on some way to handle arbitrary precision ints (and floats?).
Petri,
no problem. I understand. At least, I'm happy to see that this jansson limitation starts to become increasingly annoying is under your radar.
I'm looking forward how you are going to address it in a hopefully near future release.
Greetings,
@akheron How to use 64bit unsigned long long int in jansson ?? I don't see any unsigned integer usage example in upstream branch..
It’s not possible currently