Closed GoogleCodeExporter closed 9 years ago
After r278 JsonNull elements created by Gson during deserialization are same
elements. So, the reference equality will work for them.
Original comment by inder123
on 29 Oct 2008 at 11:34
While it is nice to have equal method in JsonElement itself, it comes at a cost
of a
much more expensive value equality check instead of reference equality which is
the
default. Since we internally use collections to hold JsonElements, I would be
concerned about the performance implications of implementing value equality.
Can you
give specific cases where this would be desirable?
Original comment by inder123
on 29 Oct 2008 at 11:39
I have lost track of the test case that was failing for me when I switched from
json-marshaller to google-gson. I have sense worked around this. (I think by
comparing strings and not the objects).
The general use-case is when you are manual creating JsonObjects and you want to
compare them.
Original comment by jacob.to...@gmail.com
on 31 Oct 2008 at 9:00
FYI... The attached patch implements deep equals methods which addresses this
issue.
The patch also includes my escaping work because I was too lazy to cut it out.
Original comment by z13g...@gmail.com
on 23 Apr 2009 at 9:00
Attachments:
Deferred to a future release.
Original comment by inder123
on 29 Sep 2009 at 9:09
This issue can probably be closed; JsonElement is abstract and cannot be
instantiated.
Original comment by jessewil...@google.com
on 20 Aug 2010 at 5:13
... and actually it shouldn't be closed; the problem is that equals() and
hashCode() aren't implemented for any of the JsonElement subtypes.
Original comment by limpbizkit
on 3 Sep 2010 at 6:58
Issue 225 has been merged into this issue.
Original comment by limpbizkit
on 3 Sep 2010 at 6:58
Original comment by inder123
on 1 Nov 2010 at 10:31
Original comment by inder123
on 3 Nov 2010 at 12:28
Original comment by inder123
on 3 Nov 2010 at 12:28
This issue was closed by revision r726.
Original comment by limpbizkit
on 15 Feb 2011 at 12:14
Original issue reported on code.google.com by
jacob.to...@gmail.com
on 20 Oct 2008 at 7:37