diff --git a/src/utils/responseFormatUtility.ts b/src/utils/responseFormatUtility.ts index e2c126e2..ad3db1a5 100644 --- a/src/utils/responseFormatUtility.ts +++ b/src/utils/responseFormatUtility.ts @@ -1,7 +1,5 @@ 'use strict'; -import { applyEdits, format as JSONFormat } from "jsonc-parser/lib/umd/main"; -import { EOL } from "os"; import { window } from 'vscode'; import { MimeUtility } from './mimeUtility'; const pd = require('pretty-data').pd; @@ -11,8 +9,7 @@ export class ResponseFormatUtility { if (contentType) { if (MimeUtility.isJSON(contentType)) { if (ResponseFormatUtility.IsJsonString(body)) { - const edits = JSONFormat(body, undefined, { tabSize: 2, insertSpaces: true, eol: EOL }); - body = applyEdits(body, edits); + body = pd.json(body) } else if (!suppressValidation) { window.showWarningMessage('The content type of response is application/json, while response body is not a valid json string'); }