MCPcopy Create free account
hub / github.com/Illumina/paragraph / parseFromStream

Function parseFromStream

external/jsoncpp/jsoncpp.cpp:2250–2262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2248// global functions
2249
2250bool parseFromStream(
2251 CharReader::Factory const& fact, JSONCPP_ISTREAM& sin,
2252 Value* root, JSONCPP_STRING* errs)
2253{
2254 JSONCPP_OSTRINGSTREAM ssin;
2255 ssin << sin.rdbuf();
2256 JSONCPP_STRING doc = ssin.str();
2257 char const* begin = doc.data();
2258 char const* end = begin + doc.size();
2259 // Note that we do not actually need a null-terminator.
2260 CharReaderPtr const reader(fact.newCharReader());
2261 return reader->parse(begin, end, root, errs);
2262}
2263
2264JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM& sin, Value& root) {
2265 CharReaderBuilder b;

Callers 2

getJsonRootFunction · 0.85
jsoncpp.cppFile · 0.85

Calls 4

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

Tested by 1

getJsonRootFunction · 0.68