Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMilo Yip <miloyip@gmail.com>2014-08-09 17:37:02 +0400
committerMilo Yip <miloyip@gmail.com>2014-08-09 17:37:02 +0400
commit1900b7bacea0d3329cd3ecc7aba4262b4bea8307 (patch)
tree9267ebd471e1eea7f4c1621a855bfd8aa7a70ebc /doc
parent0d915644a4cf03ef14ecffe54e6b8cb506fd40e9 (diff)
Remove double precision settings API in Writer
Diffstat (limited to 'doc')
-rw-r--r--doc/sax.md16
1 files changed, 1 insertions, 15 deletions
diff --git a/doc/sax.md b/doc/sax.md
index 9ad2e4b9..bbdc5507 100644
--- a/doc/sax.md
+++ b/doc/sax.md
@@ -225,7 +225,7 @@ You may doubt that, why not just using `sprintf()` or `std::stringstream` to bui
There are various reasons:
1. `Writer` must output a well-formed JSON. If there is incorrect event sequence (e.g. `Int()` just after `StartObject()`), it generates assertion fail in debug mode.
2. `Writer::String()` can handle string escaping (e.g. converting code point `U+000A` to `\n`) and Unicode transcoding.
-3. `Writer` handles number output consistently. For example, user can set precision for `Double()`.
+3. `Writer` handles number output consistently.
4. `Writer` implements the event handler concept. It can be used to handle events from `Reader`, `Document` or other event publisher.
5. `Writer` can be optimized for different platforms.
@@ -258,20 +258,6 @@ The last one, `Allocator` is the type of allocator, which is used for allocating
Besides, the constructor of `Writer` has a `levelDepth` parameter. This parameter affects the initial memory allocated for storing information per hierarchy level.
-## Precision (#WriterPrecision)
-
-When using `Double()`, the precision of output can be specified, for example:
-
-~~~~~~~~~~cpp
-writer.SetDoublePrecision(4);
-writer.StartArary();
-writer.Double(3.14159265359);
-writer.EndArray();
-~~~~~~~~~~
-~~~~~~~~~~
-[3.1416]
-~~~~~~~~~~
-
## PrettyWriter {#PrettyWriter}
While the output of `Writer` is the most condensed JSON without white-spaces, suitable for network transfer or storage, it is not easily readable by human.