feature request: parse_float callback, as in Python's json loader
Python lets you do
>>> import decimal
>>> json.loads('1.1', parse_float=decimal.Decimal)
Decimal('1.1')
I would be tempted to use something like this, except I would read them as flint2 fmpq rational data types. On the other hand I guess it would not work well with jansson's API. Also I could imagine it might break JSON semantics if things that look like floats are not interpreted as double precision IEEE floating point numbers, so maybe it's just a bad idea.
I see this is related to https://github.com/akheron/jansson/pull/158. I'd use it for scientific computing instead of for bitcoin or financial data, but that PR would work for me.
Maybe also related to this bignum issue https://github.com/akheron/jansson/issues/69
#69 is the way to go. Nobody just ever finished the work.