JSON makes no distinction between real and integer numbers; Jansson
does. Real numbers are mapped to the ``double`` type and integers to
-the ``int`` type.
+the ``json_int_t`` type, which is a typedef of ``long long`` or
+``long``, depending on whether ``long long`` is supported by your
+compiler or not.
A JSON number is considered to be a real number if its lexical
representation includes one of ``e``, ``E``, or ``.``; regardless if
-------------------------------
Real numbers whose absolute values are too small to be represented in
-a C double will be silently estimated with 0.0. Thus, depending on
+a C ``double`` will be silently estimated with 0.0. Thus, depending on
platform, JSON numbers very close to zero such as 1E-999 may result in
0.0.
Real numbers whose absolute values are too large to be represented in
-a C ``double`` type will result in an overflow error (a JSON decoding
+a C ``double`` will result in an overflow error (a JSON decoding
error). Thus, depending on platform, JSON numbers like 1E+999 or
-1E+999 may result in a parsing error.
Likewise, integer numbers whose absolute values are too large to be
-represented in the ``int`` type will result in an overflow error (a
-JSON decoding error). Thus, depending on platform, JSON numbers like
-1000000000000000 may result in parsing error.
+represented in the ``json_int_t`` type (see above) will result in an
+overflow error (a JSON decoding error). Thus, depending on platform,
+JSON numbers like 1000000000000000 may result in parsing error.
Parsing JSON real numbers may result in a loss of precision. As long
as overflow does not occur (i.e. a total loss of precision), the
-----
No support is provided in Jansson for any C numeric types other than
-``int`` and ``double``. This excludes things such as unsigned types,
-``long``, ``long long``, ``long double``, etc. Obviously, shorter
-types like ``short`` and ``float`` are implicitly handled via the
-ordinary C type coercion rules (subject to overflow semantics). Also,
-no support or hooks are provided for any supplemental "bignum" type
-add-on packages.
+``json_int_t`` and ``double``. This excludes things such as unsigned
+types, ``long double``, etc. Obviously, shorter types like ``short``,
+``int``, ``long`` (if ``json_int_t`` is ``long long``) and ``float``
+are implicitly handled via the ordinary C type coercion rules (subject
+to overflow semantics). Also, no support or hooks are provided for any
+supplemental "bignum" type add-on packages.