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

Patch for iostream support #20

Open
GoogleCodeExporter opened this issue May 17, 2015 · 4 comments
Open

Patch for iostream support #20

GoogleCodeExporter opened this issue May 17, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

I have added implementations for std::istream and std::ostream compatible 
stream objects for rapidjson.  See attached patch.

Original issue reported on code.google.com by [email protected] on 18 Mar 2012 at 4:35

Attachments:

@GoogleCodeExporter
Copy link
Author

I meant to flag this as an enhancement when creating the issue -- my 
apologies...

Original comment by [email protected] on 18 Mar 2012 at 4:36

@GoogleCodeExporter
Copy link
Author

I had the same problem and fixed it this way. Also wrote an ostream wrapper.
One thing to mention about the istream wrapper:

int Peek() {
   return _is->eof() ? '\0' : _is->peek();
}

peek kind of has to check for eof, otherwise it will return -1 instead of '\0'

Is there a way to read the first of multiple top level objects - particularly 
when reading from stream/socket?

Original comment by [email protected] on 15 May 2012 at 1:54

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 18 Oct 2012 at 8:21

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 24 Jun 2014 at 2:08

  • Changed state: Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant