Menu

#1 iostream reader/writer

closed
nobody
None
5
2007-03-23
2006-10-04
No

It is rather awkward to read a file as a string.
(getline() with EOF works, but it's hard to remember.)

It would be helpful if the reader could read from an
istream, and if the writer could write to an ostream.

(I would add this myself, but by Subversion does not
support SSL.)

Discussion

  • Christopher Dunn

    Logged In: YES
    user_id=1540698
    Originator: YES

    Added
    - parse(istream&),
    - operator>>(istream&, Json::Value&), and
    - operator<<(ostream&, Json::Value&),
    with sensible defaults for the operators. Also, operator>>() can throw std::exception.

    I may have messed up the code section of the front-page jsoncpp.dox -- not sure. It shows up funny in my browser.

     
  • Christopher Dunn

    Logged In: YES
    user_id=1540698
    Originator: YES

    Forgot to close.

     
  • Christopher Dunn

    • status: open --> closed
     
  • Christopher Dunn

    Logged In: YES
    user_id=1540698
    Originator: YES

    Forgot to close.

     

Log in to post a comment.