Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse sample with istream_iterator in README ignores whitespace in string #112

Open
sakichan opened this issue Jul 13, 2018 · 0 comments
Open

Comments

@sakichan
Copy link

sakichan commented Jul 13, 2018

std::istream_iterator (actually, std::istream_iterator<char>) skips whitespace depending on the configuration of the underlying stream, and input streams are configured to skip whitespace by default.

So, the sample with std::istream_iterator in README ignores whitespace in string in JSON.

To fix this, std::noskipws manipulator should be applied to the stream, or the sample needs to use std::istreambuf_iterator<char> instead.

@sakichan sakichan changed the title parse sample with istrream_iterator in README ignores whitespace in string parse sample with istream_iterator in README ignores whitespace in string Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant