比较Rapidjson :: Documents [英] Compare rapidjson::Documents

查看:183
本文介绍了比较Rapidjson :: Documents的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个Rapid Jason文件.我在运行时创建的一个,另一个是从磁盘读取的

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

我想比较这两个文档是否相似.比较RapidJson文档的最佳方法是什么.

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

我的乔恩看起来像这样

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

推荐答案

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

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;

这篇关于比较Rapidjson :: Documents的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆