Tidied the pretty print conditionals in json.stringify.