Formats a JSON stream to make it more readable by adding proper indentation and newlines.