aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2014-04-30 12:46:33 +0300
committerPetri Lehtinen <petri@digip.org>2014-04-30 12:46:34 +0300
commit17b5fdd94b1e22ec294f6cb746599aafc021a54b (patch)
tree4eba46be0023bc31f7da9fe3d73f397a2ad5c2d7 /doc
parent5b88cc5ded24fd9802358a03794054485fb523f8 (diff)
downloadjansson-17b5fdd94b1e22ec294f6cb746599aafc021a54b.zip
jansson-17b5fdd94b1e22ec294f6cb746599aafc021a54b.tar.gz
jansson-17b5fdd94b1e22ec294f6cb746599aafc021a54b.tar.bz2
Add JSON_REAL_PRECISION
Fixes #178.
Diffstat (limited to 'doc')
-rw-r--r--doc/apiref.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/apiref.rst b/doc/apiref.rst
index d3f6227..9c29c79 100644
--- a/doc/apiref.rst
+++ b/doc/apiref.rst
@@ -905,6 +905,16 @@ can be ORed together to obtain *flags*.
.. versionadded:: 2.4
+``JSON_REAL_PRECISION(n)``
+ Output all real numbers with at most *n* digits of precision. The
+ valid range for *n* is between 0 and 31 (inclusive), and other
+ values result in an undefined behavior.
+
+ By default, the precision is 17, to correctly and losslessly encode
+ all IEEE 754 double precision floating point numbers.
+
+ .. versionadded:: 2.7
+
The following functions perform the actual JSON encoding. The result
is in UTF-8.