We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3a17ac commit 534f801Copy full SHA for 534f801
tools/json_formatter.html
@@ -787,7 +787,20 @@ <h1>JSON Formatter</h1>
787
try {
788
const parsedJson = formatJSON(inputValue, true);
789
if (parsedJson) {
790
- renderJSON(parsedJson);
+ while (jsonOutput.firstChild) {
791
+ jsonOutput.removeChild(jsonOutput.firstChild);
792
+ }
793
+
794
+ placeholder.style.display = 'none';
795
+ jsonOutput.style.display = 'block';
796
797
+ const pre = document.createElement('pre');
798
+ pre.style.margin = '0';
799
+ pre.style.whiteSpace = 'pre-wrap';
800
+ pre.style.wordBreak = 'break-all';
801
+ pre.textContent = formattedJson;
802
+ jsonOutput.appendChild(pre);
803
804
showNotification('JSON minified!');
805
}
806
} catch (error) {
0 commit comments