yudai / gojsondiff

Go JSON Diff
Other
532 stars 81 forks source link

Delta colors/diff not shown #22

Open virtuald opened 7 years ago

virtuald commented 7 years ago

Using a.json and b.json (formatted and sorted so one could use the 'diff' tool against it also), the jd tool does not show a visual difference using colored ascii mode, and the delta mode isn't very useful either.

The output of diff -u on the files is as follows:

@@ -3,10 +3,6 @@
         "FolderShape": {
             "AdditionalProperties": [
                 {
-                    "FieldURI": "folder:ParentFolderId",
-                    "__type": "PathToUnindexedField:#Exchange"
-                },
-                {
                     "PropertyTag": "0x3004",
                     "PropertyType": "String",
                     "__type": "PathToExtendedField:#Exchange"
@@ -22,6 +18,10 @@
                     "PropertySetId": "A7B529B5-4B75-47A7-A24F-20743D6C55CD",
                     "PropertyType": "Integer",
                     "__type": "PathToExtendedField:#Exchange"
+                },
+                {
+                    "FieldURI": "folder:ParentFolderId",
+                    "__type": "PathToUnindexedField:#Exchange"
                 }
             ],
             "BaseShape": "Default",

Json attached to the following gist: https://gist.github.com/virtuald/71fae5b37d63a2bf9f58ac6933edb46e . Thanks for the tool, it's really useful!

yudai commented 7 years ago

Hi, did you add the -c option?

virtuald commented 7 years ago

Yes.