@@ -51,7 +51,7 @@ preserved.
5151
5252\code
5353Json::Value root; // 'root' will contain the root value after parsing.
54- std::cin >> root; // Or see Json::CharReaderBuilder.
54+ std::cin >> root;
5555
5656// Get the value of the member of root named 'encoding', return 'UTF-8' if there is no
5757// such member.
@@ -72,24 +72,29 @@ root["indent"]["length"] = getCurrentIndentLength();
7272root["indent"]["use_space"] = getCurrentIndentUseSpace();
7373
7474// If you like the defaults, you can insert directly into a stream.
75- std::cout << root; // Or see Json::StreamWriterBuilder
75+ std::cout << root;
76+ // Of course, you can write to `std::ostringstream` if you prefer.
7677
7778// If desired, remember to add a linefeed and flush.
7879std::cout << std::endl;
7980\endcode
8081
8182\section _advanced Advanced usage
82-
83+ We are finalizing the new *Builder* API, which will be in versions
84+ `1.4.0` and `0.8.0` when released. Until then, you may continue to
85+ use the old API, include `Writer`, `Reader`, and `Feature`.
8386\code
84- // Of course, you can write to `std::ostringstream` if you prefer. Or
85- // use `writeString()` for convenience, with a specialized builder.
87+
88+ // EXPERIMENTAL
89+ // Or use `writeString()` for convenience, with a specialized builder.
8690Json::StreamWriterBuilder wbuilder;
8791builder.indentation_ = "\t";
8892std::string document = Json::writeString(root, wbuilder);
8993
9094// You can also read into a particular sub-value.
9195std::cin >> root["subtree"];
9296
97+ // EXPERIMENTAL
9398// Here we use a specialized Builder, discard comments, and
9499// record errors.
95100Json::CharReaderBuilder rbuilder;
0 commit comments