📝 improve documentation InputType and IteratorType

This commit is contained in:
Niels Lohmann 2022-01-04 13:16:23 +01:00
parent 9e89c2fdb5
commit 10486abe35
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 6 additions and 1 deletions

View File

@ -32,10 +32,14 @@ Unlike the [`parse`](parse.md) function, this function neither throws an excepti
- a `FILE` pointer - a `FILE` pointer
- a C-style array of characters - a C-style array of characters
- a pointer to a null-terminated string of single byte 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. - an object `obj` for which `begin(obj)` and `end(obj)` produces a valid pair of iterators.
`IteratorType` `IteratorType`
: a compatible iterator type : a compatible iterator type, for instance.
- a pair of `std::string::iterator` or `std::vector<std::uint8_t>::iterator`
- a pair of pointers such as `ptr` and `ptr + len`
## Parameters ## Parameters

View File

@ -31,6 +31,7 @@ static basic_json parse(IteratorType first, IteratorType last,
- a `FILE` pointer - a `FILE` pointer
- a C-style array of characters - a C-style array of characters
- a pointer to a null-terminated string of single byte 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. - an object `obj` for which `begin(obj)` and `end(obj)` produces a valid pair of iterators.
`IteratorType` `IteratorType`