mirror of
https://github.com/Redocly/redoc.git
synced 2025-07-13 09:42:23 +03:00
Render valid JSON in samples (quoted object keys)
This commit is contained in:
parent
9aea9bc683
commit
0b46186585
|
@ -82,7 +82,7 @@ function objectToHTML(json) {
|
||||||
key = keys[i];
|
key = keys[i];
|
||||||
hasContents = true;
|
hasContents = true;
|
||||||
output += '<li><div class="hoverable ' + collapsed + '">';
|
output += '<li><div class="hoverable ' + collapsed + '">';
|
||||||
output += '<span class="property">' + htmlEncode(key) + '</span>: ';
|
output += '<span class="property">\"' + htmlEncode(key) + '"</span>: ';
|
||||||
output += valueToHTML(json[key]);
|
output += valueToHTML(json[key]);
|
||||||
if (i < length - 1) {
|
if (i < length - 1) {
|
||||||
output += ',';
|
output += ',';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user