I am trying to use rapidjson to output itself to a string to save to a database, using the following code :
StringBuffer buffer;
Writer<FileStream> writer(buffer);
rest.Accept(writer);
string reststring = buffer.GetString();
where rest is a rapidjson::Document.
However I get the following error :
no matching function for call to ‘rapidjson::Writer<rapidjson::FileStream>::Writer (rapidjson::StringBuffer&)’.
which is strange because the author of rapidjson recommended this method in an answer to a previous SO question.