{"name":"simdjson","version":"0.0.5","description":"Parsing gigabytes of JSON per second","main":"index.js","gypfile":true,"scripts":{"build":"node-gyp rebuild","clean":"node-gyp clean","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git+https://github.com/luizperes/simdjson_nodejs.git"},"keywords":["json","parser","simd","jsonparser","parsing"],"author":{"name":"Luiz Peres"},"license":"Apache-2.0","bugs":{"url":"https://github.com/luizperes/simdjson_nodejs/issues"},"homepage":"https://github.com/luizperes/simdjson_nodejs#readme","devDependencies":{"benchmark":"^2.1.4","node-gyp":"^4.0.0"},"dependencies":{"node-addon-api":"^1.6.2"},"gitHead":"82306fbf0ceed131a49d24c2239a8d11d9f42c80","_id":"simdjson@0.0.5","_nodeVersion":"12.0.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ymhD5p7VXnXZun3OTCx6CqKfFRiEXtaVvFyid9Iu/VMv1d+7tReE2Wl4LZyg+T4yAyqqwBaBA60EEokg+U6BEw==","shasum":"e02e7a31cd29e7fac4b9a47a8b0da444c90a2ab5","tarball":"http://registry-npm.ywwl.com/simdjson/download/simdjson-0.0.5.tgz","fileCount":44,"unpackedSize":18488178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwV4ACRA9TVsSAnZWagAAB5sP/2vPls8Kw9K6/HAjJWnS\nGj0SsVVYYI54j6C1KiwI0uBBw//32PMpUbbwsr2J5FDdORGO1c6EB66vwwCi\n+Ce4+zImvSF23RirwW9UYVSJ7KtLwENnQynuOJQN2fzLg4b9xfqpVz0nMc0x\nI6IoaViO+7owz6E9wMtEBgRSDX+Ll/H43hgXuhfOgr10tQfHMzwHlh0cUq4s\nIz9m44+EWvFFzgKr7xLKf09EA7QDp0EOK70AzOo76+QmZMwgV8wHi527SkQ8\nFyAGbyisiyW1KDzq9vaA47bhsWUBwW1Hb77abcjkzeMjEagQVrg1INXuTG2V\nAC4Sn6TgiWS9vW2792G510xeWq3tS4KB7uswWmDqI7fqE1gfjgoCDaF3Dvt6\nLbrnxBIHsPwEy+dUlQGGH2OxePGqROFzNTy40IYUSkOY5CSzUrtF7/BNbjPS\n1aUFmIb7cHZJimy6dmRc8k4jaI3VOyzavhRY34+N/iqWq0vn2RDNy0cBSo3L\nDf0n6NR800rR7cezBphWT1giJoZN0H5YI6/ICawPLZNBj3/A55g5fxQGerX+\nvsGapuh55KSIaBfnccdlzNgUN4K2iBNl97TybW53VSMuXhhWhOnfZRAD1pu1\nGNI1qXh4nEoPMEJTS/HHgb+z/b/5fyMl+TLnIFR6WnylXtJRPKkoeU7YNwy0\nsSVc\r\n=CaBo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHiGCv71BZx2zAjaDPetKqGHtWacedS28v5OBqkjmASnAiEAkBUCJfSpDdcewgty0UPPGny8JPeWzUhpLYAqbG1NYsE="}],"size":3085940,"noattachment":false,"key":"/simdjson/-/simdjson-0.0.5.tgz"},"maintainers":[{"name":"luizperes","email":"lperesde@sfu.ca"}],"_npmUser":{"name":"luizperes","email":"lperesde@sfu.ca"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simdjson_0.0.5_1556176383023_0.6188791540653324"},"_hasShrinkwrap":false,"readme":"# simdjson_nodejs\n[![tests](https://github.com/luizperes/simdjson_nodejs/workflows/tests/badge.svg?branch=master)](https://github.com/luizperes/simdjson_nodejs/actions)\n[![npm](https://img.shields.io/npm/v/simdjson.svg)](https://www.npmjs.com/package/simdjson)\n[![npm](https://img.shields.io/npm/dm/simdjson.svg)](https://www.npmjs.com/package/simdjson)\n[![npm](https://img.shields.io/npm/l/simdjson.svg)](https://github.com/luizperes/simdjson_nodejs/blob/master/LICENCE)\n\n> Node.js bindings for [simdjson](https://github.com/lemire/simdjson), a gigabytes-per-second JSON parser, possibly the fastest JSON parser at the moment. *simdjson* as well as *simdjson_nodejs* work on popular platforms such as OS X, Linux, and Windows.\n\n## Installation\nThe installation can be done in one step with `npm`:\n\n`npm install simdjson`\n\n## Usage\n\n##### API Documentation\nSee [index.d.ts](index.d.ts) for available `simdjson` binding functions and their input/output types.\n\n##### Check if a JSON string is valid:\n```Javascript\nconst simdjson = require('simdjson');\n\nconst jsonString = \"{ \\\"answer\\\": 42 }\";\nconst valid = simdjson.isValid(jsonString); // true\n```\n\n##### Parsing a JSON string (lazily)\n_Obs.: Please see that the overhead of converting a C++ object to a JS object might make the parsing time in the NodeJS slower for the simdjson. Therefore, parsing it lazily is preferrable. For more information check issue #5._\n```Javascript\nconst simdjson = require('simdjson');\n\nconst jsonString = \"{   \\\n  \\\"foo\\\": {            \\\n    \\\"bar\\\": [ 0, 42 ]  \\\n  }                     \\\n}\";\nconst JSONbuffer = simdjson.lazyParse(jsonString); // external (C++) parsed JSON object\nconsole.log(JSONbuffer.valueForKeyPath(\"foo.bar[1]\")); // 42\n```\n\n##### Parsing a JSON string\n_Obs.: Parsing a JSON lazily is preferrable._\n```Javascript\nconst simdjson = require('simdjson');\n\nconst jsonString = \"{   \\\n  \\\"foo\\\": {            \\\n    \\\"bar\\\": [ 0, 42 ]  \\\n  }                     \\\n}\";\nconst parsedJSON = simdjson.parse(jsonString); // parsed JSON object\n```\n\n## Benchmarks\n\nRequirements: git, npm, node, a linux-like system, a recent compiler (GCC,clang)\n\nTo benchmark directly from the project:\n\n```\ngit clone https://github.com/luizperes/simdjson_nodejs.git\ncd simdjson_nodejs\nnpm install\nnpm run benchmark\n```\n\n| filename | filesize (MB) | JSON.parse(ms) | simdjson.lazyParse (ms) | JSON.parse (GB/s) | simdjson.lazyParse (GB/s) | X faster |\n| :-- | --: | --: | --: | --: | --: | --: |\n| apache_builds.json | 0.13 | 0.303 | 0.158 | 0.42 | 0.80 | 1.91 |\n| canada.json | 2.25 | 14.332 | 7.584 | 0.16 | 0.30 | 1.89 |\n| citm_catalog.json | 1.73 | 5.387 | 5.768 | 0.32 | 0.30 | 0.93 |\n| github_events.json | 0.07 | 0.192 | 0.091 | 0.34 | 0.71 | 2.10 |\n| gsoc_2018.json | 3.33 | 5.420 | 3.839 | 0.61 | 0.87 | 1.41 |\n| instruments.json | 0.22 | 0.673 | 0.619 | 0.33 | 0.36 | 1.09 |\n| marine_ik.json | 2.98 | 13.169 | 6.397 | 0.23 | 0.47 | 2.06 |\n| mesh_pretty.json | 1.58 | 5.704 | 3.043 | 0.28 | 0.52 | 1.87 |\n| mesh.json | 0.72 | 2.856 | 1.404 | 0.25 | 0.52 | 2.03 |\n| numbers.json | 0.15 | 0.643 | 0.280 | 0.23 | 0.54 | 2.30 |\n| random.json | 0.51 | 1.914 | 2.447 | 0.27 | 0.21 | 0.78 |\n| sf_citylots.json | 189.78 | 1492.166 | 709.692 | 0.13 | 0.27 | 2.10 |\n| twitter.json | 0.63 | 1.621 | 2.112 | 0.39 | 0.30 | 0.77 |\n| twitterescaped.json | 0.56 | 1.924 | 0.959 | 0.29 | 0.59 | 2.01 |\n| update_center.json | 0.53 | 2.803 | 2.715 | 0.19 | 0.20 | 1.03 |\n\nResults from a 2018 MacBook Pro with 2.3GHz Intel Core i9.\n\n### Ops/sec\n\n```text\napache_builds.json#simdjson x 6,844 ops/sec ±1.61% (90 runs sampled) => 0.146ms\napache_builds.json#JSON x 3,274 ops/sec ±1.83% (90 runs sampled) => 0.305ms\ncanada.json#simdjson x 183 ops/sec ±7.69% (72 runs sampled) => 5.475ms\ncanada.json#JSON x 71.87 ops/sec ±0.92% (74 runs sampled) => 13.914ms\ncitm_catalog.json#simdjson x 155 ops/sec ±2.95% (72 runs sampled) => 6.470ms\ncitm_catalog.json#JSON x 207 ops/sec ±59.63% (90 runs sampled) => 4.820ms\ngithub_events.json#simdjson x 11,783 ops/sec ±1.80% (90 runs sampled) => 0.085ms\ngithub_events.json#JSON x 120 ops/sec ±192.65% (92 runs sampled) => 8.310ms\ngsoc_2018.json#simdjson x 307 ops/sec ±1.81% (79 runs sampled) => 3.255ms\ngsoc_2018.json#JSON x 166 ops/sec ±47.75% (81 runs sampled) => 6.029ms\ninstruments.json#simdjson x 3,691 ops/sec ±2.06% (87 runs sampled) => 0.271ms\ninstruments.json#JSON x 2,155 ops/sec ±0.83% (93 runs sampled) => 0.464ms\nmarine_ik.json#simdjson x 140 ops/sec ±3.08% (73 runs sampled) => 7.133ms\nmarine_ik.json#JSON x 51.20 ops/sec ±60.81% (76 runs sampled) => 19.533ms\nmesh_pretty.json#simdjson x 504 ops/sec ±1.93% (87 runs sampled) => 1.985ms\nmesh_pretty.json#JSON x 251 ops/sec ±1.02% (85 runs sampled) => 3.987ms\nmesh.json#simdjson x 733 ops/sec ±0.99% (92 runs sampled) => 1.363ms\nmesh.json#JSON x 349 ops/sec ±0.64% (89 runs sampled) => 2.869ms\nnumbers.json#simdjson x 4,099 ops/sec ±1.10% (94 runs sampled) => 0.244ms\nnumbers.json#JSON x 1,372 ops/sec ±38.74% (95 runs sampled) => 0.729ms\nrandom.json#simdjson x 504 ops/sec ±0.97% (91 runs sampled) => 1.983ms\nrandom.json#JSON x 538 ops/sec ±0.93% (91 runs sampled) => 1.859ms\nsf_citylots.json#simdjson x 1.76 ops/sec ±4.02% (9 runs sampled) => 569.580ms\nsf_citylots.json#JSON x 0.53 ops/sec ±20.38% (6 runs sampled) => 1880.563ms\ntwitter.json#simdjson x 478 ops/sec ±0.68% (89 runs sampled) => 2.093ms\ntwitter.json#JSON x 612 ops/sec ±0.90% (91 runs sampled) => 1.633ms\ntwitterescaped.json#simdjson x 1,203 ops/sec ±1.80% (88 runs sampled) => 0.831ms\ntwitterescaped.json#JSON x 488 ops/sec ±2.33% (82 runs sampled) => 2.051ms\nupdate_center.json#simdjson x 469 ops/sec ±3.43% (85 runs sampled) => 2.132ms\nupdate_center.json#JSON x 293 ops/sec ±12.87% (57 runs sampled) => 3.410ms\n```\n\n###### Observation:\nPlease refer to the the original repository benchmarks for more information about the performance of *simdjson* [https://github.com/lemire/simdjson](https://github.com/lemire/simdjson).\n\n","publish_time":1556176383312,"_cnpm_publish_time":1556176383312,"dist-tags":{"latest":"0.9.2"}}