MCPcopy Create free account
hub / github.com/ComodoSecurity/openedr / parseFromStream

Function parseFromStream

edrav2/eprj/jsoncpp/src/lib_json/json_reader.cpp:1996–2008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1994// global functions
1995
1996bool parseFromStream(CharReader::Factory const& fact,
1997 JSONCPP_ISTREAM& sin,
1998 Value* root,
1999 JSONCPP_STRING* errs) {
2000 JSONCPP_OSTRINGSTREAM ssin;
2001 ssin << sin.rdbuf();
2002 JSONCPP_STRING doc = ssin.str();
2003 char const* begin = doc.data();
2004 char const* end = begin + doc.size();
2005 // Note that we do not actually need a null-terminator.
2006 CharReaderPtr const reader(fact.newCharReader());
2007 return reader->parse(begin, end, root, errs);
2008}
2009
2010JSONCPP_ISTREAM& operator>>(JSONCPP_ISTREAM& sin, Value& root) {
2011 CharReaderBuilder b;

Callers 1

json_reader.cppFile · 0.85

Calls 6

newCharReaderMethod · 0.80
rdbufMethod · 0.45
strMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected