{"_id":"koa-json","_rev":"333430","name":"koa-json","description":"pretty (non-compressed) json response middleware","dist-tags":{"latest":"2.0.2","next":"2.0.2"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"}],"time":{"modified":"2021-06-08T13:12:17.000Z","created":"2014-02-01T02:55:54.751Z","2.0.2":"2016-04-28T05:27:53.612Z","1.1.3":"2016-04-28T05:21:31.815Z","2.0.1":"2016-04-28T02:55:33.079Z","1.1.2":"2016-04-28T01:43:06.971Z","2.0.0":"2016-03-27T13:10:58.311Z","1.1.1":"2014-07-24T22:25:42.961Z","1.1.0":"2014-05-28T08:00:41.612Z","1.0.1":"2014-05-03T21:23:47.685Z","1.0.0":"2014-05-03T03:11:29.010Z","0.0.2":"2014-03-02T01:39:12.929Z","0.0.1":"2014-02-01T02:55:54.751Z"},"users":{"oleg_tsyba":true,"beyond5959":true,"tunnckocore":true,"atomgao":true,"karbunkul":true,"tomgao365":true},"repository":{"type":"git","url":"git+https://github.com/koajs/json.git"},"versions":{"2.0.2":{"name":"koa-json","version":"2.0.2","repository":{"type":"git","url":"git+https://github.com/koajs/json.git"},"description":"pretty (non-compressed) json response middleware","keywords":["koa","json"],"dependencies":{"koa-is-json":"1","streaming-json-stringify":"3"},"devDependencies":{"istanbul":"0","mocha":"2","koa":"2","supertest":"1"},"license":"MIT","scripts":{"test":"NODE_ENV=test mocha --reporter spec","test-cov":"NODE_ENV=test istanbul cover ./node_modules/.bin/_mocha","test-travis":"NODE_ENV=test istanbul cover ./node_modules/.bin/_mocha --report lcovonly"},"files":["index.js"],"gitHead":"741f78c09f4b1db55f857d0489b14498e7a42e30","bugs":{"url":"https://github.com/koajs/json/issues"},"homepage":"https://github.com/koajs/json#readme","_id":"koa-json@2.0.2","_shasum":"36af14e6ea1f5d646d7c44a285701c6f85a4fde4","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.0","_npmUser":{"name":"coderhaoxin","email":"coderhaoxin@outlook.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"}],"dist":{"shasum":"36af14e6ea1f5d646d7c44a285701c6f85a4fde4","size":1534,"noattachment":false,"key":"/koa-json/-/koa-json-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-json/download/koa-json-2.0.2.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/koa-json-2.0.2.tgz_1461821270925_0.45889200852252543"},"directories":{},"publish_time":1461821273612,"_cnpm_publish_time":1461821273612,"_hasShrinkwrap":false},"1.1.3":{"name":"koa-json","version":"1.1.3","repository":{"type":"git","url":"git+https://github.com/koajs/json.git"},"description":"pretty (non-compressed) json response middleware","keywords":["koa","json"],"dependencies":{"koa-is-json":"1","streaming-json-stringify":"3"},"devDependencies":{"istanbul":"0","mocha":"2","koa":"1","supertest":"1"},"license":"MIT","scripts":{"test":"NODE_ENV=test mocha --reporter spec","test-cov":"NODE_ENV=test istanbul cover ./node_modules/.bin/_mocha","test-travis":"NODE_ENV=test istanbul cover ./node_modules/.bin/_mocha --report lcovonly"},"files":["index.js"],"gitHead":"6c6db187957d14609a7ca3339eca24e13dfe9250","bugs":{"url":"https://github.com/koajs/json/issues"},"homepage":"https://github.com/koajs/json#readme","_id":"koa-json@1.1.3","_shasum":"59e3363f421f61ef586ad72ca49fce9a85484d26","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.0","_npmUser":{"name":"coderhaoxin","email":"coderhaoxin@outlook.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"}],"dist":{"shasum":"59e3363f421f61ef586ad72ca49fce9a85484d26","size":1483,"noattachment":false,"key":"/koa-json/-/koa-json-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-json/download/koa-json-1.1.3.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/koa-json-1.1.3.tgz_1461820891346_0.7083591541741043"},"directories":{},"publish_time":1461820891815,"_cnpm_publish_time":1461820891815,"_hasShrinkwrap":false},"2.0.1":{"name":"koa-json","version":"2.0.1","repository":{"type":"git","url":"git+https://github.com/koajs/json.git"},"description":"pretty (non-compressed) json response middleware","keywords":["koa","json"],"dependencies":{"koa-is-json":"1","streaming-json-stringify":"3"},"devDependencies":{"istanbul":"0","mocha":"2","koa":"2","supertest":"1"},"license":"MIT","scripts":{"test":"NODE_ENV=test mocha --reporter spec","test-cov":"NODE_ENV=test istanbul cover ./node_modules/.bin/_mocha","test-travis":"NODE_ENV=test istanbul cover ./node_modules/.bin/_mocha --report lcovonly"},"files":["index.js"],"gitHead":"a790fec5234521cfd95da3905d6989f33d31082e","bugs":{"url":"https://github.com/koajs/json/issues"},"homepage":"https://github.com/koajs/json#readme","_id":"koa-json@2.0.1","_shasum":"1036a45f72457bd21e343ce38d587e556e32ec3d","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"coderhaoxin","email":"coderhaoxin@outlook.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"}],"dist":{"shasum":"1036a45f72457bd21e343ce38d587e556e32ec3d","size":1038,"noattachment":false,"key":"/koa-json/-/koa-json-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-json/download/koa-json-2.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/koa-json-2.0.1.tgz_1461812132648_0.213080033659935"},"directories":{},"publish_time":1461812133079,"_cnpm_publish_time":1461812133079,"_hasShrinkwrap":false},"1.1.2":{"name":"koa-json","version":"1.1.2","repository":{"type":"git","url":"git+https://github.com/koajs/json.git"},"description":"pretty (non-compressed) json response middleware","keywords":["koa","json"],"dependencies":{"koa-is-json":"1","streaming-json-stringify":"3"},"devDependencies":{"istanbul":"0","mocha":"2","koa":"1","supertest":"1"},"license":"MIT","scripts":{"test":"NODE_ENV=test mocha --reporter spec","test-cov":"NODE_ENV=test istanbul cover ./node_modules/.bin/_mocha","test-travis":"NODE_ENV=test istanbul cover ./node_modules/.bin/_mocha --report lcovonly"},"files":["index.js"],"gitHead":"6c6db187957d14609a7ca3339eca24e13dfe9250","bugs":{"url":"https://github.com/koajs/json/issues"},"homepage":"https://github.com/koajs/json#readme","_id":"koa-json@1.1.2","_shasum":"3759bfa43f73417c123b68555fb94d2005481f88","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.0.0","_npmUser":{"name":"coderhaoxin","email":"coderhaoxin@outlook.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"}],"dist":{"shasum":"3759bfa43f73417c123b68555fb94d2005481f88","size":1016,"noattachment":false,"key":"/koa-json/-/koa-json-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-json/download/koa-json-1.1.2.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/koa-json-1.1.2.tgz_1461807784844_0.9981235212180763"},"directories":{},"publish_time":1461807786971,"_cnpm_publish_time":1461807786971,"_hasShrinkwrap":false},"2.0.0":{"name":"koa-json","version":"2.0.0","repository":{"type":"git","url":"git+https://github.com/koajs/json.git"},"description":"pretty (non-compressed) json response middleware","keywords":["koa","json"],"dependencies":{"koa-is-json":"1","streaming-json-stringify":"3"},"devDependencies":{"istanbul":"0","mocha":"2","koa":"2","supertest":"1"},"license":"MIT","scripts":{"test":"NODE_ENV=test mocha --reporter spec","test-cov":"NODE_ENV=test istanbul cover ./node_modules/.bin/_mocha","test-travis":"NODE_ENV=test istanbul cover ./node_modules/.bin/_mocha --report lcovonly"},"files":["index.js"],"gitHead":"33f2d092319ab9d3c452c0cbd862c825bfee3468","bugs":{"url":"https://github.com/koajs/json/issues"},"homepage":"https://github.com/koajs/json#readme","_id":"koa-json@2.0.0","_shasum":"e592948a1f65944e3dcd19549e56c91bad9c9af6","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.0","_npmUser":{"name":"coderhaoxin","email":"coderhaoxin@outlook.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"}],"dist":{"shasum":"e592948a1f65944e3dcd19549e56c91bad9c9af6","size":1497,"noattachment":false,"key":"/koa-json/-/koa-json-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-json/download/koa-json-2.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/koa-json-2.0.0.tgz_1459084257900_0.798634794075042"},"directories":{},"publish_time":1459084258311,"_cnpm_publish_time":1459084258311,"_hasShrinkwrap":false},"1.1.1":{"name":"koa-json","version":"1.1.1","repository":{"type":"git","url":"https://github.com/koajs/json"},"description":"pretty (non-compressed) json response middleware","keywords":["koa","json"],"dependencies":{"koa-is-json":"1","streaming-json-stringify":"1"},"devDependencies":{"mocha":"1","should":"3","koa":"0","supertest":"0"},"license":"MIT","scripts":{"test":"make test"},"gitHead":"a8484975e97e681b8322838741ed1a6b5057bfef","bugs":{"url":"https://github.com/koajs/json/issues"},"homepage":"https://github.com/koajs/json","_id":"koa-json@1.1.1","_shasum":"cf522d960c9c24fd1efc7bee493632bd3de663ee","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"}],"dist":{"shasum":"cf522d960c9c24fd1efc7bee493632bd3de663ee","size":2451,"noattachment":false,"key":"/koa-json/-/koa-json-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-json/download/koa-json-1.1.1.tgz"},"directories":{},"publish_time":1406240742961,"_cnpm_publish_time":1406240742961,"_hasShrinkwrap":false},"1.1.0":{"name":"koa-json","version":"1.1.0","repository":{"type":"git","url":"git://github.com/koajs/json"},"description":"pretty (non-compressed) json response middleware","keywords":["koa","json"],"dependencies":{"koa-is-json":"1","is-object-stream":"1","streaming-json-stringify":"1"},"devDependencies":{"mocha":"*","should":"*","koa":"*","supertest":"0"},"license":"MIT","scripts":{"test":"make test"},"bugs":{"url":"https://github.com/koajs/json/issues"},"homepage":"https://github.com/koajs/json","_id":"koa-json@1.1.0","_shasum":"6090b94e03ab454c6fa27900e14ff741947c78a6","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"}],"dist":{"shasum":"6090b94e03ab454c6fa27900e14ff741947c78a6","size":2449,"noattachment":false,"key":"/koa-json/-/koa-json-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-json/download/koa-json-1.1.0.tgz"},"directories":{},"publish_time":1401264041612,"_cnpm_publish_time":1401264041612,"_hasShrinkwrap":false},"1.0.1":{"name":"koa-json","version":"1.0.1","repository":{"type":"git","url":"git://github.com/koajs/json"},"description":"pretty (non-compressed) json response middleware","keywords":["koa","json"],"dependencies":{"koa-is-json":"1"},"devDependencies":{"mocha":"*","should":"*","koa":"*","supertest":"0"},"license":"MIT","scripts":{"test":"make test"},"bugs":{"url":"https://github.com/koajs/json/issues"},"homepage":"https://github.com/koajs/json","_id":"koa-json@1.0.1","dist":{"shasum":"02189faf9e14130c652ba0ea0c63a2539469402d","size":1872,"noattachment":false,"key":"/koa-json/-/koa-json-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-json/download/koa-json-1.0.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"}],"directories":{},"publish_time":1399152227685,"_cnpm_publish_time":1399152227685,"_hasShrinkwrap":false},"1.0.0":{"name":"koa-json","version":"1.0.0","repository":{"type":"git","url":"git://github.com/koajs/json"},"description":"pretty (non-compressed) json response middleware","keywords":["koa","json"],"dependencies":{"koa-is-json":"1"},"devDependencies":{"mocha":"*","should":"*","koa":"*","supertest":"0"},"license":"MIT","scripts":{"test":"make test"},"bugs":{"url":"https://github.com/koajs/json/issues"},"homepage":"https://github.com/koajs/json","_id":"koa-json@1.0.0","_shasum":"1448346d3acdfcbd5cee78acfecd2368994092c6","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"}],"dist":{"shasum":"1448346d3acdfcbd5cee78acfecd2368994092c6","size":1842,"noattachment":false,"key":"/koa-json/-/koa-json-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-json/download/koa-json-1.0.0.tgz"},"directories":{},"publish_time":1399086689010,"_cnpm_publish_time":1399086689010,"_hasShrinkwrap":false},"0.0.2":{"name":"koa-json","version":"0.0.2","repository":{"type":"git","url":"git://github.com/koajs/json"},"description":"pretty (non-compressed) json response middleware","keywords":["koa","json"],"dependencies":{},"devDependencies":{"mocha":"*","should":"*","koa":"git://github.com/koajs/koa","supertest":"~0.8.2"},"license":"MIT","scripts":{"test":"make test"},"bugs":{"url":"https://github.com/koajs/json/issues"},"homepage":"https://github.com/koajs/json","_id":"koa-json@0.0.2","dist":{"shasum":"2d1a948cbf01f5c682c2dde7bf36c985fe35bdae","size":1878,"noattachment":false,"key":"/koa-json/-/koa-json-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-json/download/koa-json-0.0.2.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"jonathanong","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"}],"directories":{},"publish_time":1393724352929,"_cnpm_publish_time":1393724352929,"_hasShrinkwrap":false},"0.0.1":{"name":"koa-json","version":"0.0.1","repository":{"type":"git","url":"git://github.com/koajs/json"},"description":"pretty (non-compressed) json response middleware","keywords":["koa","json"],"dependencies":{},"devDependencies":{"mocha":"*","should":"*","koa":"koajs/koa","supertest":"~0.8.2"},"license":"MIT","bugs":{"url":"https://github.com/koajs/json/issues"},"homepage":"https://github.com/koajs/json","_id":"koa-json@0.0.1","dist":{"shasum":"5ff46598a34c2407ecb165c3551f2fd4e008e99a","size":1690,"noattachment":false,"key":"/koa-json/-/koa-json-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/koa-json/download/koa-json-0.0.1.tgz"},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"aheckmann","email":"aaron.heckmann+github@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"}],"directories":{},"publish_time":1391223354751,"_cnpm_publish_time":1391223354751,"_hasShrinkwrap":false}},"readme":"\n# koa-json\n\n  JSON pretty-printed response middleware.\n  Also converts node object streams to binary.\n\n## Installation\n\n```\n$ npm install koa-json\n```\n\n## Options\n\n - `pretty` default to pretty response [true]\n - `param` optional query-string param for pretty responses [none]\n - `spaces` JSON spaces [2]\n\n## Example\n\n  Always pretty by default:\n\n```js\nvar json = require('koa-json');\nvar Koa = require('koa');\nvar app = new Koa();\n\napp.use(json());\n\napp.use((ctx) => {\n  ctx.body = { foo: 'bar' };\n});\n```\n\n  yields:\n\n```js\n$ GET /\n\n{\n  \"foo\": \"bar\"\n}\n```\n\n  Default to being disabled (useful in production), but\n  togglable via the query-string parameter:\n\n```js\nvar Koa = require('koa');\nvar app = new Koa();\n\napp.use(json({ pretty: false, param: 'pretty' }));\n\napp.use((ctx) => {\n  ctx.body = { foo: 'bar' };\n});\n```\n\n yields:\n\n```js\n$ GET /\n\n{\"foo\":\"bar\"}\n```\n\n```js\n$ GET /?pretty\n\n{\n  \"foo\": \"bar\"\n}\n```\n\n# License\n\n  MIT\n","_attachments":{},"homepage":"https://github.com/koajs/json#readme","bugs":{"url":"https://github.com/koajs/json/issues"},"license":"MIT"}