使用ace_editor编辑器想要展示“对象或者数组内容”,而非文本格式,应该如何实现?

项目环境:angular8
ace_editor相应配置:
// 开启代码折叠
this.editor.getSession().setUseWrapMode(true);
this.editor.setOptions({
mode: 'ace/mode/javascript',
readOnly: false,
theme: 'ace/theme/github',
newLineMode: 'unix'
});
问题描述:当编辑器的内容是“字符串格式”时,可以正常显示内容,把内容替换为“对象”或“数组”格式时,程序就会报错。
content = 'Hello World'; 成功
content = {
aa: '123',
bb: '123'
}; 报错
报错信息:
Unhandled Promise rejection: e.match is not a function ; Zone: <root> ; Task: Promise.then ; Value: TypeError: e.match is not a function

不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 以帮助更多的人 ^-^