Open Bishalsahoo opened 6 years ago
@miloyip can you help me please ? Its kinda urgent . Hope for your response soon
I haven't digged into your code. Why not just using d1 == d2
?
i want to compare the keys that only exists in the reference template(stencil)
https://drive.google.com/open?id=1HY-jfMId7qELNZdm2Iu1tXP-QZr2e-9y please have a look into the raw json. My code is not diving deep enough to get and compare array inside deep_nested_array
Yes I want to validate values of two json based on the template and I will be going through that but your help to complete the code will be very helpful as it is kinda urgent please @miloyip . I am unable to find a way to iterate through the inner nested array elements
I cannot help finishing your own work. Please understand.
No I know that but can you show me the way to iterate into nested array get the elements and check if the value in the array is another array and loop in its value to check if they are equal , just need help with this logic as i am able to enter the array (for instance deep_nested_array in this case )but unable to iterate thought the sub array and check the value. whatever i try is showing error . Just help me with the logic I will be able to complete it
I tried to use the schema too but the problem is the parser is unable to detect the sub nested array and just returns the key on the outer loop , because of that it compares the value of deep_nested_array rather than going deep into it to get the object_array and the key elements inside it. I need a way to get the keys inside the deep_nested_array and then inside the object_array. As I mentioned i tried to loop inside the deep_nested_array and get the index numbers but unable to access the sub element object in it and loop inside them(ie i can loop inside the 1st array but unable to get value or key to compare and loop further with in them). Please help me just with the logic, how to do it.
Can anyone help me to complete the correct way of recursion by passing the value parameter back to continue the loop for the deeper array (Please refer the post above). @miloyip
Hello , I am a bit stuck in comparing two json strings
/ CAN ANYONE PLEASE HELP ME WITH THIS RECURSION (I WANT TO SEND THE ARRAY AS PARAMETER(LIKE I PREVIOUSLY RECEIVED THE JSON VALUE ASTER PARSING TO THE RESPECTIVE VALUE FIELD OF THE isJsonEqual(VALUE &,VALUE&,VALUE&,A) /
Here I am able to compare the simple Json with single array but when there are n number of nested array it doesnt works the way it should be . I need it to loop into array element and check them individually as there might be sub array . I tried to do that with assert(d1[itr->name.IsArray()]) but it will be a same problem if it has more subarrays in those sub array cant write loops to find if the key is an arrary till n number of times and if there is any other functionality in rapidjson I am unknown as I am absolutely new to rapidjson. Can anyone please help me complete the code to make it effective ? In the above case the object_array and deep_nested_array are the one that mismatch even though they are same according to the stencil(the reference) . The output should be true but it is false instead. Please help me with this.