Skip to content

Commit c55bbde

Browse files
committed
json_reader can take string source
1 parent 0a8f596 commit c55bbde

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

doc/ref/csv/csv_reader.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,20 @@ source_type |Src
4646
(1) Constructs a `csv_reader` that reads from a character sequence or stream `source`
4747
and a [json_content_handler](../json_content_handler.md) that receives
4848
JSON events. Uses default [csv_options](csv_options.md).
49-
You must ensure that the source and input handler exist as long as does `csv_reader`, as `csv_reader` holds pointers to but does not own these objects.
5049

5150
(2) Constructs a `csv_reader` that that reads from a character sequence or stream `source`, a [json_content_handler](../json_content_handler.md) that receives
5251
JSON events, and [csv_options](csv_options.md).
53-
You must ensure that the source and input handler exist as long as does `csv_reader`, as `csv_reader` holds pointers to but does not own these objects.
5452

5553
(3) Constructs a `csv_reader` that reads from a character sequence or stream `source`, a [json_content_handler](../json_content_handler.md) that receives
5654
JSON events and the specified [parse_error_handler](../parse_error_handler.md).
5755
Uses default [csv_options](csv_options.md).
58-
You must ensure that the source, input handler, and error handler exist as long as does `csv_reader`, as `csv_reader` holds pointers to but does not own these objects.
5956

6057
(4) Constructs a `csv_reader` that reads from a character sequence or stream `source`, a [json_content_handler](../json_content_handler.md) that receives
6158
JSON events, [csv_options](csv_options.md),
6259
and the specified [parse_error_handler](../parse_error_handler.md).
63-
You must ensure that the source, input handler, and error handler exist as long as does `csv_reader`, as `csv_reader` holds pointers to but does not own these objects.
60+
61+
Note: It is the programmer's responsibility to ensure that `basic_csv_reader` does not outlive any source,
62+
content handler, and error handler passed in the constuctor, as `basic_csv_reader` holds pointers to but does not own these resources.
6463

6564
#### Parameters
6665

doc/ref/json_cursor.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,15 @@ and a specified [parse_error_handler](parse_error_handler.md).
126126
Constructors (8)-(14) read from a character sequence or stream and set `ec`
127127
if a parsing error is encountered while processing the initial event.
128128

129+
Note: It is the programmer's responsibility to ensure that `basic_json_cursor` does not outlive any source,
130+
content handler, and error handler passed in the constuctor, as `basic_json_cursor` holds pointers to but does not own these resources.
131+
129132
#### Parameters
130133

131134
`source` - a value from which a `jsoncons::basic_string_view<char_type>` is constructible,
132135
or a value from which a `source_type` is constructible. In the case that a `jsoncons::basic_string_view<char_type>` is constructible
133136
from `source`, `source` is dispatched immediately to the parser. Otherwise, the `json_cursor` reads from a `source_type` in chunks.
134137

135-
Note: It is the programmer's responsibility to ensure that `json_cursor` does not outlive an error handler passed in the constuctor.
136-
137138
#### Member functions
138139

139140
bool done() const override;

doc/ref/json_reader.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ uses the specified [options](json_decode_options.md)
112112
and a specified [parse_error_handler](parse_error_handler.md).
113113

114114
Note: It is the programmer's responsibility to ensure that `basic_json_reader` does not outlive any source,
115-
content handler, and error handler passed in the constuctor.
115+
content handler, and error handler passed in the constuctor, as `basic_json_reader` holds pointers to but does not own these resources.
116116

117117
#### Parameters
118118

0 commit comments

Comments
 (0)