Avatar of Rohit Bajaj
Rohit Bajaj
Flag for India asked on

diff of two jsonobjects

hi
i am using gson library. and need to find the diff of two json objects in JAVA
like if first one has a crn : 123
and second also
then difd wont contain this
but if second one has crn:125
then it returns crn:123
so the preference is given to the first one.
and an element is included only if either its not there in the other one. or its not same...
there could be nesting of objects...

is there any easy way or library to do it.
thanks
JavaJSON

Avatar of undefined
Last Comment
David Favor

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
David Favor

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck