mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
Use JSON output object for json mimetype (#197871)
This commit is contained in:
parent
9891465832
commit
cb6c07d46d
|
@ -139,6 +139,8 @@ function convertJupyterOutputToBuffer(mime: string, value: unknown): NotebookCel
|
|||
}
|
||||
} else if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
||||
return NotebookCellOutputItem.text(JSON.stringify(value), mime);
|
||||
} else if (mime === 'application/json') {
|
||||
return NotebookCellOutputItem.json(value, mime);
|
||||
} else {
|
||||
// For everything else, treat the data as strings (or multi-line strings).
|
||||
value = Array.isArray(value) ? concatMultilineString(value) : value;
|
||||
|
|
Loading…
Reference in a new issue