Use JSON:encode_pretty to create the machine-readable documentation

This commit changes replaces JSON:encode with JSON:encode_pretty
to make the machine-readable documentation (and their version control
diffs) easier to read for humans.