MCPcopy Create free account
hub / github.com/SOUI2/soui / parseFromStream

Function parseFromStream

third-part/jsoncpp/src/lib_json/json_reader.cpp:2036–2048  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2034// global functions
2035
2036bool parseFromStream(
2037 CharReader::Factory const& fact, JSONCPP_ISTREAM& sin,
2038 Value* root, JSONCPP_STRING* errs)
2039{
2040 JSONCPP_OSTRINGSTREAM ssin;
2041 ssin << sin.rdbuf();
2042 JSONCPP_STRING doc = ssin.str();
2043 char const* begin = doc.data();
2044 char const* end = begin + doc.size();
2045 // Note that we do not actually need a null-terminator.
2046 CharReaderPtr const reader(fact.newCharReader());
2047 return reader->parse(begin, end, root, errs);
2048}
2049
2050JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM& sin, Value& root) {
2051 CharReaderBuilder b;

Callers 1

json_reader.cppFile · 0.85

Calls 4

newCharReaderMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected