Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin config differ generates spurious diffs for JSON #392

Closed
amcclain opened this issue Jun 15, 2018 · 2 comments
Closed

Admin config differ generates spurious diffs for JSON #392

amcclain opened this issue Jun 15, 2018 · 2 comments
Assignees

Comments

@amcclain
Copy link
Member

Not positive on this but it seems like the differ generates JSON diffs when I would not expect them. Want to see if this is more strict somehow than it should be - or thinking it would be better for JSON configs to ignore whitespace entirely.

@febbraiod
Copy link
Member

febbraiod commented Jun 19, 2018

I can see the issue with a diff generated for "{"key":&nbsp"value"}" and {"key":&nbsp&nbsp"value"} (Github keeps correcting my spacing hence the &nbsp). However, I don't think ignoring whitespace entirely is the answer. There is a effective difference between something like "{"key": "start date" and {"key": "startdate"}.

@febbraiod
Copy link
Member

I think the thing to do is parse the JSON into JS objects and deeply compare the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants