比较rapidjson:文档

Compare rapidjson::Documents

本文关键字:文档 rapidjson 比较      更新时间:2023-10-16

我有两个RapidJSON文档。一个是在运行时创建的,另一个是从磁盘读取的。

我想比较一下这两个文档是否相似。比较RapidJSON文档的最佳方法是什么?

我的JSON是这样的

{
    "SimpleCompany:Manager":
    {
        "read":true,
        "update":true,
        "delete":true,
        "insert":true
    },
    "SimpleCompany:Manager":
    {
        "read":true,
        "update":true,
        "delete":true,
        "insert":true
    },
}

是的,现在,GenericValue用其他值,字符串或原语覆盖operator==:

bool operator==(const GenericValue<...>& rhs) const;
bool operator==(const Ch* rhs) const;
bool operator==(const std::basic_string<Ch>& rhs) const;
bool operator==(const T& rhs) const;