有效的JSON必須同時具有引號中的對象的鍵和值。用引號括住所有的鍵,這會使錯誤消失。
參考:JSON spec
更新:我做了骯髒的工作適合你。讓我知道這是否修復它。
{ "name": "embedly"
, "version": "0.3.2"
, "description": "Embedly client library for node"
, "homepage": "https://github.com/embedly/embedly-node"
, "keywords": []
, "author":
{ "name": "Bob Corsaro"
, "email": "[email protected]"
, "url": "http://www.google.com/profiles/rcorsaro"
}
, "repository":
{ "type": "git"
, "url": "git://github.com/embedly/embedly-node"
}
, "bugs": { "web": "http://github.com/embedly/embedly-node/issues/" }
, "directories":
{ "doc": "./docs"
, "lib": "./lib"
, "test": "./test"
}
, "dependencies": {"hashish": "", "qs": ""}
, "devDependencies": {"vows": ">= 0.5.6"}
, "main": "./lib/embedly.js"
, "scripts": { "test": "vows" }
, "bin":
{ "embedly_oembed": "bin/embedly_oembed.js"
, "embedly_objectify": "bin/embedly_objectify.js"
, "embedly_preview": "bin/embedly_preview.js"
}
}
http://jsonlint.com/ – Domenic 2013-12-12 21:22:27
@fancy查看我的回答,我認爲它是最優雅的方式。你可以重置安塞? – Barun 2015-07-28 12:20:33