ccls/serializer.h
2017-02-28 20:12:57 -08:00

13 lines
405 B
C++

#include <rapidjson/document.h>
#include <rapidjson/prettywriter.h>
struct IndexedFile;
using Writer = rapidjson::PrettyWriter<rapidjson::StringBuffer>;
using Reader = rapidjson::Document;
void Serialize(Writer& writer, IndexedFile* file);
void Deserialize(Reader& reader, IndexedFile* file);
std::string Serialize(IndexedFile* file);
IndexedFile Deserialize(std::string path, std::string serialized);