lambdaisland / deep-diff2

Deep diff Clojure data structures and pretty print the result
Eclipse Public License 1.0
296 stars 18 forks source link

`#uuid` and `#inst` printing #9

Closed nwjsmith closed 5 years ago

nwjsmith commented 5 years ago

Hi there, I noticed that UUIDs and java.util.Dates print as objects rather than as their tagged literal form.

(ddiff/pretty-print (ddiff/diff #inst "2019-04-01T14:38:55.998-00:00"
                                #inst "2019-04-01T14:39:11.732-00:00"))

prints as

-#<java.util.Date@5c6429fc Mon Apr 01 10:38:55 EDT 2019>
+#<java.util.Date@69ad72db Mon Apr 01 10:39:11 EDT 2019>

and

(ddiff/pretty-print (ddiff/diff #uuid "70fa1988-a1d0-42f3-9c81-8d60ac3e999a"
                                #uuid "0f2386f7-0587-46c7-8211-b3919f07fca8"))

prints as

-#<java.util.UUID@68e1706a 70fa1988-a1d0-42f3-9c81-8d60ac3e999a>
+#<java.util.UUID@5a4ce851 0f2386f7-0587-46c7-8211-b3919f07fca8>

would you be interested in a patch that includes printers for these?

plexus commented 5 years ago

Yes, please, that sounds useful.