typescript Json Convert - zLulus/My_Note GitHub Wiki

关键代码

this.data={};
// json string
this.dataStr=JSON.stringify(this.data);
// json object
this.convertData=JSON.parse(this.dataStr);

示例代码

https://github.com/zLulus/NotePractice/tree/dev3/Website/DotNetCore/CoreAngular/src/app/json-examples

参考资料

http://choly.ca/post/typescript-json/