Skip to content

Commit c36142d

Browse files
authored
Allow passing yyjson flags in the read(istream) method (#425)
1 parent 5c20194 commit c36142d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/rfl/json/read.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ Result<internal::wrap_in_rfl_array_t<T>> read(
4545

4646
/// Parses an object from a stringstream.
4747
template <class T, class... Ps>
48-
auto read(std::istream& _stream) {
48+
auto read(std::istream& _stream, const yyjson_read_flag _flag = 0) {
4949
const auto json_str = std::string(std::istreambuf_iterator<char>(_stream),
5050
std::istreambuf_iterator<char>());
51-
return read<T, Ps...>(json_str);
51+
return read<T, Ps...>(json_str, _flag);
5252
}
5353

5454
} // namespace json

0 commit comments

Comments
 (0)