Dumps a javascript object as a JSON string, formatted for either HTML or a text file. It provides proper line breaks and left indentation