mirror of
https://github.com/USCiLab/cereal.git
synced 2025-10-18 01:45:52 +02:00
documentation and fixed a typo
This commit is contained in:
@@ -283,7 +283,7 @@ namespace cereal
|
||||
even cout! */
|
||||
JSONInputArchive(std::istream & stream) :
|
||||
InputArchive<JSONInputArchive>(this),
|
||||
itsReadStream(is)
|
||||
itsReadStream(stream)
|
||||
{
|
||||
itsDocument.ParseStream<0>(itsReadStream);
|
||||
itsValueStack.push_back(itsDocument.MemberBegin());
|
||||
|
||||
@@ -294,6 +294,15 @@ int main()
|
||||
std::cout << "---------------------" << std::endl << str << std::endl << "---------------------" << std::endl;
|
||||
}
|
||||
|
||||
{
|
||||
cereal::JSONOutputArchive archive( std::cout );
|
||||
bool arr[] = {true, false};
|
||||
std::vector<int> vec = {1, 2, 3, 4, 5};
|
||||
archive( CEREAL_NVP(vec),
|
||||
arr );
|
||||
}
|
||||
|
||||
|
||||
//{
|
||||
// std::ifstream is("file.json");
|
||||
// cereal::JSONInputArchive iar( is );
|
||||
|
||||
Reference in New Issue
Block a user