undid double stringify
This commit is contained in:
2
dist/swagger-ui.js
vendored
2
dist/swagger-ui.js
vendored
@@ -2096,7 +2096,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
|
||||
} else if (contentType === "application/json" || /\+json$/.test(contentType)) {
|
||||
json = null;
|
||||
try {
|
||||
json = JSON.stringify(JSON.stringify(JSON.parse(content), null, " "));
|
||||
json = JSON.stringify(JSON.parse(content), null, " ");
|
||||
} catch (_error) {
|
||||
e = _error;
|
||||
json = "can't parse JSON. Raw result:\n\n" + content;
|
||||
|
||||
2
dist/swagger-ui.min.js
vendored
2
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -368,7 +368,7 @@ class OperationView extends Backbone.View
|
||||
else if contentType is "application/json" || /\+json$/.test(contentType)
|
||||
json = null
|
||||
try
|
||||
json = JSON.stringify(JSON.stringify(JSON.parse(content), null, " "))
|
||||
json = JSON.stringify(JSON.parse(content), null, " ")
|
||||
catch e
|
||||
json = "can't parse JSON. Raw result:\n\n" + content
|
||||
code = $('<code />').text(json)
|
||||
|
||||
Reference in New Issue
Block a user