json转换任意语言代码
cmd
npm install json-to-any --save
`
使用
> 参考 在线演示项目
`ts
import { parse } from "json-to-any";
// 支持js对象
// 支持json数据
const jsonCode = {
name: "Jack",
age: 20,
car: {
brand: "BMW",
}
};
const options = {
original: false, // 是否保留原始数据
};
const entityList = parse(jsonCode, options);
``