@142vip.utils.变量.VipJSON - 142vip/core-x GitHub Wiki
API 参考 / @142vip/utils / VipJSON
constVipJSON:object
定义于: packages/utils/src/pkgs/json.ts:68
处理JSON
clone: <
T>(json) =>T
json克隆复制 参考:https://www.npmjs.com/package/klona
T
T
T
parse: <
T>(originData,defaultData) =>T
解析JSON串
T
undefined | null | string
Partial<T>
T
readFile: (
name,cwd) =>JSONFile
Reads a JSON file and returns the parsed data.
string
string
JSONFile
stringify: (
value,replacer?,space?) =>string
JSON序列化
any
(this, key, value) => any
string | number
string
writeFile: (
file) =>void
Writes the given data to the specified JSON file.
JSONFile
void