Compare rapidjson::Documents

…衆ロ難τιáo~ 提交于 2019-12-10 11:22:48

问题


I have two Rapid Jason documents. one I created at run time and other one is read from disk

I want to compare these two documents that they are similar or not. what is best way to compare rapidJson documents.

My josn looks like this

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

回答1:


Yes, now, GenericValue overrides the operator== with other values, strings or primitives:

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;


来源:https://stackoverflow.com/questions/24909621/compare-rapidjsondocuments

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!