There is only one truth. It is the source.

Getting rid of excess whitespace in Django JSON fixtures

January 16, 2013

Tags: django, json

Django's included version of simplejson outputs spaces after commas. This means that JSON fixtures generated using dumpdata have extra spaces in them. If your editor removes trailing spaces when a file is saved, editing a fixture causes a diff much bigger than it should. This makes reading diffs annoying.

This situation can be fixed by installing simplejson >= 2.1.5. Django will use a newer version of simplejson if it can import it.

See https://code.djangoproject.com/ticket/13182.