t
This commit is contained in:
@@ -4,17 +4,19 @@
|
||||
<section class="diZContainer diZmxAuto diZmy8">
|
||||
<h1 class="diZBorderBottom">JSON Formatter</h1>
|
||||
<div class="diZFlexRowCol">
|
||||
<div class="diZw100 jsonCustomHeight diZFlexColumn diZJsonInputBorder">
|
||||
<div class="diZw100 jsonCustomHeight diZFlexColumn diZJsonInputBorder diZBorderRadius5px diZmr2">
|
||||
<textarea oninput="parseJSON()" id="jsonInput" class="diZJsonInput diZScrollBarNone" rows="40" placeholder="Enter JSON here"></textarea><br>
|
||||
</div>
|
||||
<div class="diZw100 jsonCustomHeight diZFlexColumn diZJsonInputBorder">
|
||||
<div class="diZw100 jsonCustomHeight diZFlexColumn diZJsonInputBorder diZBorderRadius5px">
|
||||
<div id="output" class="diZJsonViewer"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="diZFloatRight diZFlexRow diZJustifyCenter diZItemsCenter">
|
||||
<p class=" diZJsonKey" id="countArray">Array Length: 0</p>
|
||||
<button class="diZmt4 diZmb4 diZml2" onclick="copyToClipboard()"><span>Copy JSON</span></button>
|
||||
<button class="diZmt4 diZmb4 diZml2" onclick="downloadJsonData()"><span>Download JSON</span></button>
|
||||
</div>
|
||||
|
||||
<button class="diZFloatRight diZmt4 diZmb4 diZml2 diZJsonCopyButton" onclick="copyToClipboard()">Copy JSON</button>
|
||||
<button class="diZFloatRight diZmt4 diZmb4 diZml2 diZJsonCopyButton" onclick="downloadJsonData()">Download JSON</button>
|
||||
<p class="diZFloatRight diZJsonKey diZmt4" id="countArray">Array Length: 0</p>
|
||||
</section>
|
||||
<script>
|
||||
function parseJSON() {
|
||||
@@ -29,7 +31,6 @@
|
||||
document.getElementById('countArray').innerHTML = 'Array Length: '+ totalObjects;
|
||||
} catch (error) {
|
||||
outputElement.textContent = 'Error parsing JSON: ' + error.message;
|
||||
outputElement.style.color = '#fff';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user