Add parameter for pretty-printing the resulting JSON string

Uses JSON.stringify's third parameter, "space". More information at [MDN docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).