Json在Connect的bodyParser中解析

时间:2013-06-30 20:08:59

标签: json node.js express connect

我发送这个json来表达app并得到解析错误:

{
  "first_name" : "User",
  "last_name" : "one",
  "country" : "IN",
  "dob" : "1980-04-11",
  "email": "userone@gmail.com",
  "password": "abcd12345",
  "username": "usernameone"
}

错误是:

SyntaxError: Unexpected string
at Object.parse (native)
at IncomingMessage.<anonymous> (/Users/saransh2012/Developer/vypics/node_modules/express/node_modules/connect/lib/middleware/json.js:76:27)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at _stream_readable.js:910:16
at process._tickCallback (node.js:415:13)

我认为错误是在日期的事情,我做错了什么?请帮忙。

0 个答案:

没有答案