From d7370cc9160dd7a5b1501045efb6ffd6342e3a14 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Tue, 14 Apr 2020 08:30:06 -0400 Subject: [PATCH] Let us document the relationship between a parser instance and the parsed document. (#699) --- doc/basics.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/basics.md b/doc/basics.md index 4e72fc80..1654472b 100644 --- a/doc/basics.md +++ b/doc/basics.md @@ -50,6 +50,8 @@ dom::parser parser; dom::element doc = parser.parse("[1,2,3]"_padded); // parse a string ``` +Note: The parsed document resulting from the `parser.load` and `parser.parse` calls depends on the `parser` instance. Thus the `parser` instance must remain in scope. Furthermore, you must have at most one parsed document in play per `parser` instance. Calling `parse` or `load` a second time invalidates the previous parsed document. If you need access simultaneously to several parsed documents, you need to have several `parser` instances. + Using the Parsed JSON ---------------------