-
Notifications
You must be signed in to change notification settings - Fork 2.7k
comparing Json string #762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@cdunn2001 Can you please help me with this ? Or anyone ? |
Please use Is there a bug in the iterator? If so, please file a report. It should be possible to walk through the keys instead, and simple compare values. |
yes thats what I want , to walk through the keys and compare values. I have sent you the description to your email please help me with that , its an urgent necessity |
I think you're looking for |
I have tried to implement that but I am unable to compare the keys and values of entire json strings , It will be a great help if I can get a working code that could function according to the above mentioned Test cases , I am totally stuck . |
Thanks. Updated FAQ. |
I am facing problem with comparing two or more json string that will be passed to my function as argument, if anyone can help me with completing the code that will be helpful as I was trying the Value::const_iterator but its showing error.Kinda a newbee in the use of jsoncpp , will appreciate if anyone can help.
the aim is to compare the temp with item1 and item2 and return true or false if both equal.
the code:
Test cases: isEqualItem({id: 1, name: "test", randomNo: 1}, {id: 1, name: "test", randomNo: 1}, {id: null, name: null, randomNo: null}) //should assert true
isEqualItem({id: 1, name: "test", randomNo: 1}, {id: 1, name: "test", randomNo: 2}, {id: null, name: null, randomNo: null}) //should assert false
isEqualItem({id: 1, name: "test", randomNo: 1}, {id: 1, name: "test", randomNo: 3}, {id: null, name: null}) //should assert true
The text was updated successfully, but these errors were encountered: