Skip to content

typescript Json Convert

L edited this page Aug 14, 2018 · 2 revisions

关键代码

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/

Clone this wiki locally