Skip to content

Commit 33c07f0

Browse files
committed
fixes #245 - JSON Tree component should use quotes for the keys
1 parent 47c8f61 commit 33c07f0

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/components/api-request.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,7 @@ export default class ApiRequest extends LitElement {
584584
data-example-format = "${v.exampleFormat}"
585585
style="width:100%; resize:vertical;"
586586
.textContent = "${this.fillRequestFieldsWithExample === 'true' ? (v.exampleFormat === 'text' ? v.exampleValue : JSON.stringify(v.exampleValue, null, 2)) : ''}"
587-
>
588-
</textarea>
589-
587+
></textarea>
590588
</div>
591589
`)}
592590
@@ -935,8 +933,7 @@ export default class ApiRequest extends LitElement {
935933
<pre style="white-space:pre; max-height:400px; overflow:auto">${responseFormat
936934
? html`<code>${unsafeHTML(Prism.highlight(this.responseText, Prism.languages[responseFormat], responseFormat))}</code>`
937935
: `${this.responseText}`
938-
}
939-
</pre>
936+
}</pre>
940937
</div>`
941938
}
942939
<div class="tab-content col m-markdown" style="flex:1;display:${this.activeResponseTab === 'headers' ? 'flex' : 'none'};" >

src/components/json-tree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export default class JsonTree extends LitElement {
9999
<div class="inside-bracket">
100100
${Object.keys(data).map((key, i, a) => html`
101101
<div class="item">
102-
${detailType === 'pure_object' ? html`${key}:` : ''}
102+
${detailType === 'pure_object' ? html`"${key}":` : ''}
103103
${this.generateTree(data[key], i === (a.length - 1))}
104104
</div>`)
105105
}

0 commit comments

Comments
 (0)