read-json-file:使用回调读取和解析 JSON 文件

时间:2024-07-19 13:44:34
【文件属性】:

文件名称:read-json-file:使用回调读取和解析 JSON 文件

文件大小:5KB

文件格式:ZIP

更新时间:2024-07-19 13:44:34

JavaScript

读取json文件 使用回调异步读取和解析 JSON 文件。 用法 var readJson = require ( 'read-json-file' ) ; readJSON ( pathToYourJson , function ( error , data ) { if ( error ) { throw error ; } console . log ( data ) ; } ) ; 错误 返回任何 fs 或 JSON.Parse() 错误。 字节顺序标记 字节顺序标记在解析之前被条带化。


【文件预览】:
read-json-file-master
----.jshintignore(13B)
----index.js(577B)
----package.json(676B)
----tests()
--------index.js(2KB)
--------data()
----LICENSE(1KB)
----.gitignore(535B)
----README.md(396B)
----.jshintrc(131B)

网友评论