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