Commit 5f4eec1b authored by tomrac87's avatar tomrac87
Browse files

Added proper formatting for hal+json Content-Type responses

parent f22efb66
......@@ -1673,7 +1673,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
if (content === void 0) {
code = $('<code />').text("no content");
pre = $('<pre class="json" />').append(code);
} else if (contentType.indexOf("application/json") === 0) {
} else if (contentType.indexOf("application/json") === 0 || contentType.indexOf("application/hal+json") === 0) {
code = $('<code />').text(JSON.stringify(JSON.parse(content), null, 2));
pre = $('<pre class="json" />').append(code);
} else if (contentType.indexOf("application/xml") === 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment