MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / parseFromStream

Function parseFromStream

src/share/jsoncpp/jsoncpp.cpp:2225–2237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2223// global functions
2224
2225bool parseFromStream(
2226 CharReader::Factory const& fact, JSONCPP_ISTREAM& sin,
2227 Value* root, JSONCPP_STRING* errs)
2228{
2229 JSONCPP_OSTRINGSTREAM ssin;
2230 ssin << sin.rdbuf();
2231 JSONCPP_STRING doc = ssin.str();
2232 char const* begin = doc.data();
2233 char const* end = begin + doc.size();
2234 // Note that we do not actually need a null-terminator.
2235 CharReaderPtr const reader(fact.newCharReader());
2236 return reader->parse(begin, end, root, errs);
2237}
2238
2239JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM& sin, Value& root) {
2240 CharReaderBuilder b;

Callers 1

jsoncpp.cppFile · 0.85

Calls 4

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

Tested by

no test coverage detected