{
  "name": "body-parser",
  "description": "Node.js body parsing middleware",
  "version": "1.2.1",
  "author": {
    "name": "Jonathan Ong",
    "email": "me@jongleberry.com",
    "url": "http://jongleberry.com"
  },
  "contributors": [
    {
      "name": "Douglas Christopher Wilson",
      "email": "doug@somethingdoug.com"
    }
  ],
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "git://github.com/expressjs/body-parser"
  },
  "dependencies": {
    "bytes": "1.0.0",
    "type-is": "1.2.0",
    "raw-body": "1.1.4",
    "qs": "0.6.6"
  },
  "devDependencies": {
    "mocha": "~1.18.2",
    "should": "~3.3.1",
    "supertest": "~0.12.1"
  },
  "engines": {
    "node": ">= 0.8"
  },
  "scripts": {
    "test": "mocha --require should --reporter spec --bail"
  },
  "readme": "# body-parser [![Build Status](https://travis-ci.org/expressjs/body-parser.svg?branch=master)](https://travis-ci.org/expressjs/body-parser) [![NPM version](https://badge.fury.io/js/body-parser.svg)](https://badge.fury.io/js/body-parser)\n\nNode.js body parsing middleware.\n\nThis only handles `urlencoded` and `json` bodies.\nFor multipart bodies, you may be interested in the following modules:\n\n- [busboy](https://github.com/mscdex/busboy) and [connect-busboy](https://github.com/mscdex/connect-busboy)\n- [multiparty](https://github.com/andrewrk/node-multiparty) and [connect-multiparty](https://github.com/andrewrk/connect-multiparty)\n- [formidable](https://github.com/felixge/node-formidable)\n- [multer](https://github.com/expressjs/multer)\n\nOther body parsers you might be interested in:\n\n- [body](https://github.com/raynos/body)\n- [co-body](https://github.com/visionmedia/co-body)\n\n## Installation\n\n```sh\n$ npm install body-parser\n```\n\n## API\n\n```js\nvar express    = require('express')\nvar bodyParser = require('body-parser')\n\nvar app = express()\n\n// parse application/json and application/x-www-form-urlencoded\napp.use(bodyParser())\n\n// parse application/vnd.api+json as json\napp.use(bodyParser.json({ type: 'application/vnd.api+json' }))\n\napp.use(function (req, res, next) {\n  console.log(req.body) // populated!\n  next()\n})\n```\n\n### bodyParser(options)\n\nReturns middleware that parses both `json` and `urlencoded`.\nThe `options` are passed to both middleware, except `type`.\n\n### bodyParser.json(options)\n\nReturns middleware that only parses `json`. The options are:\n\n- `strict` - only parse objects and arrays. (default: `true`)\n- `limit` - maximum request body size. (default: `<100kb>`)\n- `reviver` - passed to `JSON.parse()`\n- `type` - request content-type to parse (default: `json`)\n- `verify` - function to verify body content\n\nThe `type` argument is passed directly to the [type-is](https://github.com/expressjs/type-is) library. This can be an extension name (like `json`), a mime type (like `application/json`), or a mime time with a wildcard (like `*/json`).\n\nThe `verify` argument, if supplied, is called as `verify(req, res, buf, encoding)`, where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error.\n\nThe `reviver` argument is passed directly to `JSON.parse` as the second argument. You can find more information on this argument [in the MDN documentation about JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter).\n\n### bodyParser.urlencoded(options)\n\nReturns middleware that only parses `urlencoded` with the [qs](https://github.com/visionmedia/node-querystring) module. The options are:\n\n- `limit` - maximum request body size. (default: `<100kb>`)\n- `type` - request content-type to parse (default: `urlencoded`)\n- `verify` - function to verify body content\n\nThe `type` argument is passed directly to the [type-is](https://github.com/expressjs/type-is) library. This can be an extension name (like `urlencoded`), a mime type (like `application/x-www-form-urlencoded`), or a mime time with a wildcard (like `*/x-www-form-urlencoded`).\n\nThe `verify` argument, if supplied, is called as `verify(req, res, buf, encoding)`, where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error.\n\n### req.body\n\nA new `body` object containing the parsed data is populated on the `request` object after the middleware.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Jonathan Ong me@jongleberry.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n",
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/expressjs/body-parser/issues"
  },
  "homepage": "https://github.com/expressjs/body-parser",
  "_id": "body-parser@1.2.1",
  "dist": {
    "shasum": "5128c1b9506ef69714dbb876df104c49cde919a0"
  },
  "_from": "body-parser@",
  "_resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.2.1.tgz"
}
