You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sooner, in version 0.177 (or so), I'd uncommented lines:
read_mulitple_json_objects();
read_json_lines();
in json_reader_examples.cpp source.
And these ndjson (so called "jsonlines") examples worked as expected.
However, right now, they don't process exactly one line - the last one.
Is it possible to fix this? (I'm guessing they are commented out and not necessarily working, but they did work before.)
expected behavior: Output to a stream the last line also proccessed.
actual behavior: It does not output the last line as processed.
Enumerate the steps to reproduce the bug
uncomment read_mulitple_json_objects() in json_reader_examples.cpp sample, build, run.
What compiler, architecture, and operating system?
Compiler: MinGW
Architecture (e.g. x86, x64) x64
Operating system: Windows 11
What jsoncons library version?
[ x] master
The text was updated successfully, but these errors were encountered:
Thanks for reporting that. The behavior of the basic_json_parser::eof() function changed in 1.0.0, that change should have been reflected in the CHANGELOG and examples, but was overlooked. Until 1.0.0, the example had to be written as
while (!reader.eof())
{
reader.read_next();
if (!reader.eof())
{
json j = decoder.get_result();
std::cout << j << '\n';
}
}
Describe the bug
Sooner, in version 0.177 (or so), I'd uncommented lines:
read_mulitple_json_objects();
read_json_lines();
in json_reader_examples.cpp source.
And these ndjson (so called "jsonlines") examples worked as expected.
However, right now, they don't process exactly one line - the last one.
Is it possible to fix this? (I'm guessing they are commented out and not necessarily working, but they did work before.)
expected behavior: Output to a stream the last line also proccessed.
actual behavior: It does not output the last line as processed.
Enumerate the steps to reproduce the bug
What compiler, architecture, and operating system?
What jsoncons library version?
The text was updated successfully, but these errors were encountered: