The json.dumps function adds trailing whitespace when using
indent, because the default separator is not ','.
The workaround [1] is to set the separators to be ',' and ': ',
e.g. separators=(',', ': ')
[1] https://hg.python.org/cpython/rev/
78bad589f205
Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
# Create the manifest from the data structure that was built
with open('python2-manifest.json.new','w') as outfile:
- json.dump(new_manifest,outfile,sort_keys=True, indent=4)
+ json.dump(new_manifest,outfile,sort_keys=True, indent=4, separators=(',', ': '))