---------------------------------------------------------- tag::doc_parsing_10[]
| 162 | //---------------------------------------------------------- |
| 163 | // tag::doc_parsing_10[] |
| 164 | value read_json( std::istream& is, boost::system::error_code& ec ) |
| 165 | { |
| 166 | stream_parser p; |
| 167 | std::string line; |
| 168 | while( std::getline( is, line ) ) |
| 169 | { |
| 170 | p.write( line, ec ); |
| 171 | if( ec ) |
| 172 | return nullptr; |
| 173 | } |
| 174 | p.finish( ec ); |
| 175 | if( ec ) |
| 176 | return nullptr; |
| 177 | return p.release(); |
| 178 | } |
| 179 | // end::doc_parsing_10[] |
| 180 | |
| 181 | // tag::doc_parsing_14[] |