From 10486abe35c8b5fe32975bdcdf52009fec7bb665 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 4 Jan 2022 13:16:23 +0100 Subject: [PATCH] :memo: improve documentation InputType and IteratorType --- doc/mkdocs/docs/api/basic_json/accept.md | 6 +++++- doc/mkdocs/docs/api/basic_json/parse.md | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/mkdocs/docs/api/basic_json/accept.md b/doc/mkdocs/docs/api/basic_json/accept.md index 8794c585dc..bbbac053aa 100644 --- a/doc/mkdocs/docs/api/basic_json/accept.md +++ b/doc/mkdocs/docs/api/basic_json/accept.md @@ -32,10 +32,14 @@ Unlike the [`parse`](parse.md) function, this function neither throws an excepti - a `FILE` pointer - a C-style array of characters - a pointer to a null-terminated string of single byte characters + - a `std::string` - an object `obj` for which `begin(obj)` and `end(obj)` produces a valid pair of iterators. `IteratorType` -: a compatible iterator type +: a compatible iterator type, for instance. + + - a pair of `std::string::iterator` or `std::vector::iterator` + - a pair of pointers such as `ptr` and `ptr + len` ## Parameters diff --git a/doc/mkdocs/docs/api/basic_json/parse.md b/doc/mkdocs/docs/api/basic_json/parse.md index 95d876b0ab..92808cd6be 100644 --- a/doc/mkdocs/docs/api/basic_json/parse.md +++ b/doc/mkdocs/docs/api/basic_json/parse.md @@ -31,6 +31,7 @@ static basic_json parse(IteratorType first, IteratorType last, - a `FILE` pointer - a C-style array of characters - a pointer to a null-terminated string of single byte characters + - a `std::string` - an object `obj` for which `begin(obj)` and `end(obj)` produces a valid pair of iterators. `IteratorType`