jansson icon indicating copy to clipboard operation
jansson copied to clipboard

Create the json_uint_t type that is mapping to unsigned long long.

Open lano1106 opened this issue 5 years ago • 5 comments

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.

lano1106 avatar Dec 02 '19 18:12 lano1106

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.

lano1106 avatar Dec 02 '19 18:12 lano1106

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?).

akheron avatar Dec 07 '19 08:12 akheron

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,

lano1106 avatar Dec 08 '19 19:12 lano1106

@akheron How to use 64bit unsigned long long int in jansson ?? I don't see any unsigned integer usage example in upstream branch..

minq-park-lge avatar Oct 07 '21 10:10 minq-park-lge

It’s not possible currently

akheron avatar Oct 07 '21 17:10 akheron