问题
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