mirror of
https://github.com/nlohmann/json.git
synced 2026-10-06 06:30:31 +00:00
docs: drop the whitespace-separator caveat from the parsing pages
The caveat added in #5343 describes the behavior this branch fixes: a number no longer consumes the character that terminates it, so concatenated values need no separator. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -40,8 +40,7 @@ what makes it possible to read several concatenated values from the same stream,
|
|||||||
document followed by trailing bytes" is accepted rather than rejected. If you are validating conformance, or need to
|
document followed by trailing bytes" is accepted rather than rejected. If you are validating conformance, or need to
|
||||||
reject any input that is not exactly one JSON document, prefer `parse`.
|
reject any input that is not exactly one JSON document, prefer `parse`.
|
||||||
|
|
||||||
When using `operator>>` to read several concatenated values this way, a value that is a number must be followed by
|
Values read this way do not need to be separated by whitespace; see the
|
||||||
whitespace, because `operator>>` consumes the character that terminates a number — see the
|
|
||||||
[`operator>>` notes](../../api/operator_gtgt.md#notes) for details and examples.
|
[`operator>>` notes](../../api/operator_gtgt.md#notes) for details and examples.
|
||||||
|
|
||||||
## SAX vs. DOM parsing
|
## SAX vs. DOM parsing
|
||||||
|
|||||||
@@ -49,5 +49,4 @@ JSON Lines input with more than one value is treated as invalid JSON by the [`pa
|
|||||||
with a JSON Lines input does not work, because the parser will try to parse one value after the last one.
|
with a JSON Lines input does not work, because the parser will try to parse one value after the last one.
|
||||||
|
|
||||||
This is different from parsing a stream of *concatenated* (non-newline-delimited) JSON values, for which
|
This is different from parsing a stream of *concatenated* (non-newline-delimited) JSON values, for which
|
||||||
`operator>>` does work, provided that a value that is a number is followed by whitespace -- see its
|
`operator>>` does work -- see its [notes](../../api/operator_gtgt.md#notes) for details.
|
||||||
[notes](../../api/operator_gtgt.md#notes) for details.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user