异步是有原因的!在@mihai扔石头否则,这是他用于异步版本的代码:// Declare variablesvar fs = require('fs'), obj// Read the file and send to the callbackfs.readFile('path/to/file', handleFile)// Write the callback functionfunction handleFile(err, data) { if (err) throw err obj = JSON.parse(data) // You can now play with your datas}