sync code

This commit is contained in:
Ned Wright
2024-11-28 10:41:59 +00:00
parent 6255e1f30d
commit 1c1f0b7e29
59 changed files with 842 additions and 707 deletions

View File

@@ -33,6 +33,18 @@ ServerRest::performRestCall(istream &in)
{
try {
try {
int firstChar = in.peek();
if (firstChar != EOF) {
// array as root is not supported in JSONInputArchive format
// but this struct is in bulk invalidations requirements
// we will change the format here
if (firstChar == '[') {
std::string content((std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>());
std::string modifiedContent = "{\"" + BULK_ARRAY_NAME + "\": " + content + "}";
std::istringstream* modifiedStream = new std::istringstream(modifiedContent);
in.rdbuf(modifiedStream->rdbuf());
}
}
cereal::JSONInputArchive in_ar(in);
load(in_ar);
} catch (cereal::Exception &e) {