What does `app.use(bodyParser.json())` do?

后端 未结 3 703
渐次进展
渐次进展 2020-12-22 20:21

For:

bodyParser.urlencoded({extended: ...})

my research shows me that if extended: true, then you can parse nested objects, or

3条回答
  •  不知归路
    2020-12-22 20:48

    URL encoding and JSON encoding both allow to convert a (nested) object to string, but the format is different. An URL encoded string is in general not a valid JSON string.

    One application may use one encoding method, and another the other. As long as they don't mix the two, it will work.

提交回复
热议问题