MCPcopy Create free account
hub / github.com/USCiLab/cereal / JSONInputArchive

Method JSONInputArchive

include/cereal/archives/json.hpp:435–445  ·  view source on GitHub ↗

Construct, reading from the provided stream ! @param stream The stream to read from */

Source from the content-addressed store, hash-verified

433 //! Construct, reading from the provided stream
434 /*! @param stream The stream to read from */
435 JSONInputArchive(std::istream & stream) :
436 InputArchive<JSONInputArchive>(this),
437 itsNextName( nullptr ),
438 itsReadStream(stream)
439 {
440 itsDocument.ParseStream<>(itsReadStream);
441 if (itsDocument.IsArray())
442 itsIteratorStack.emplace_back(itsDocument.Begin(), itsDocument.End());
443 else
444 itsIteratorStack.emplace_back(itsDocument.MemberBegin(), itsDocument.MemberEnd());
445 }
446
447 ~JSONInputArchive() CEREAL_NOEXCEPT = default;
448

Callers

nothing calls this directly

Calls 4

BeginMethod · 0.80
MemberBeginMethod · 0.80
MemberEndMethod · 0.80
EndMethod · 0.45

Tested by

no test coverage detected