SWIG json 对象解析到客户端 json

SWIG json object parse into Client Side json

我正在使用 Angularjs,但我想它可以很简单 JavaScript。

我做了什么:

console.log(JSON.parse({{{JSON.stringify(items)}}}));

items 有 JSON 对象。我收到错误:

Uncaught SyntaxError: Unexpected token o`.

我不确定这样做是否正确。有什么想法吗?

我想通了:

{{{items|raw|json_encode}}}