cereal:C++?????????л???
???????????? ???????[ 2014/6/11 11:42:13 ] ????????C++ net
???????????·????????????C++???????л?????????????????????Boost serialization??Google protobuf???????ù????????????????ü????о????????????????????
????cereal????
????cereal???????????BSD License????????????????C++11?????????????????????????????C++???л??????????????????????????л?????????????????????????XML?????JSON??cereal???????????????????????????——???????????????????????????????????????????????????????á?
????cereal???????????????????????л???cereal????????к?????????cereal????????????????????????????????л???????Boost??????????????ж????????????????????????????(raw pointer)??????????????????????std::shared_ptr??std??::unique_ptr?????????????
????cereal?????????C++11?????????????
????cereal??????ЩC++11?????????????????????????????C++??????????????????????????????????????g++4.7.3??clang++3.3??MSVC2013????????°汾??
??????????????????汾??????????????????????????????????g++??clang++?????????cereal?????libstdc++??libc++??
????cereal?????????????????
?????????????????У?cereal?????Boost?????л?????????????????????????????????????????????С?????cereal?????C++?е??????XML??JSON??????????????
????cereal????????
????cereal?????????????л????????????????XML??JSON???л?????
????cereal??????????Boost????????????????????? ????????????????cereal??????????????????????????????л??浵???????
????cereal??????????
?????????????cereal???л???????????????????????д??????л??????????????????????????????cereal??????????????????
???????????????cereal?????????????????????????
????????Boost??????????cereal????????????????????ù?Boost?????л????????cereal?????????????????
????????????Boost??????cereal????????????????????http://uscilab.github.io/cereal/transition_from_boost.html
???????????
?????e???????????????????????????
????std::ofstream os("my.xml");
????cereal::XMLOutputArchive archive(os);
????int age = 26;
????std::string name = "lizheng";
????archive(CEREAL_NVP(age)?? cereal::make_nvp("Name"?? name));
????????????????????int?????string?????xml???л???????????£?
????<?xml version="1.0" encoding="utf-8"?>
????<cereal>
????<age>26</age>
????<Name>lizheng</Name>
????</cereal>
???????????????е?cereal::XMLOutputArchive????????????JSON???????????л?????????????л??JSON??????????£??????????棩??
????{
????"age": 26??
????"Name": "lizheng"
????}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11