{"_id":"json-canon","_rev":"1-6a0b6371826ed7372d8fc57a4caeac7b","name":"json-canon","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"json-canon","version":"1.0.0","description":"Serialize JSON into a canonical format.","main":"src/index.js","scripts":{"test":"ava","bench":"node bench"},"repository":{"type":"git","url":"git+https://github.com/ahdinosaur/json-canon.git"},"keywords":["json","jcs","rfc8785","canon","canonical","canonicalize","crypto","hashable","hashing","signable","signing"],"author":{"name":"Michael Williams","email":"hello@mikey.nz"},"contributors":[{"name":"Samuel Erdtman","email":"samuel@erdtman.se"},{"name":"Anders Rundgren","email":"anders.rundgren.net@gmail.com"}],"license":"Apache-2.0","bugs":{"url":"https://github.com/ahdinosaur/json-canon/issues"},"homepage":"https://github.com/ahdinosaur/json-canon#readme","devDependencies":{"benchmark":"^2.1.4","canonicalize":"^2.0.0","fast-json-stable-stringify":"latest","fast-safe-stringify":"latest","fast-stable-stringify":"latest","faster-stable-stringify":"latest","fastest-stable-stringify":"latest","json-canonicalize":"^1.0.5","json-stable-stringify":"latest","json-stringify-deterministic":"latest","json-stringify-safe":"latest","safe-stable-stringify":"latest"},"gitHead":"013df33d7f19a60b7ec8a0f74fc03f522a045b70","_id":"json-canon@1.0.0","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-bB0utrt5Ta9O1LN/FpZU220uvoS4zKJcxsiMM2Jr4eu0JjPlP8whs2j+EcAUnfoi8cupREHN12AuJrcFVgB9PA==","shasum":"b34e3ee4f61e8aa8ee75fc9ddd320ae9dff47fa2","tarball":"https://registry.npmjs.org/json-canon/-/json-canon-1.0.0.tgz","fileCount":9,"unpackedSize":28211,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEO5xz3nhqWe06d0l16MrvJN/D3F1p8X6yrg571wpo4MAiBQB+UfpFkcB0c/BFCrAywqfIfXJibZNeTuFy3sw6my+g=="}]},"_npmUser":{"name":"ahdinosaur","email":"michael.williams@enspiral.com"},"directories":{},"maintainers":[{"name":"ahdinosaur","email":"michael.williams@enspiral.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-canon_1.0.0_1683718551415_0.2904106314524688"},"_hasShrinkwrap":false},"1.0.1":{"name":"json-canon","version":"1.0.1","description":"Serialize JSON into a canonical format.","main":"src/index.js","scripts":{"test":"ava","bench":"node bench"},"repository":{"type":"git","url":"git+https://github.com/ahdinosaur/json-canon.git"},"keywords":["json","jcs","rfc8785","canon","canonical","canonicalize","crypto","hashable","hashing","signable","signing"],"author":{"name":"Michael Williams","email":"hello@mikey.nz"},"contributors":[{"name":"Samuel Erdtman","email":"samuel@erdtman.se"},{"name":"Anders Rundgren","email":"anders.rundgren.net@gmail.com"}],"license":"Apache-2.0","bugs":{"url":"https://github.com/ahdinosaur/json-canon/issues"},"homepage":"https://github.com/ahdinosaur/json-canon#readme","devDependencies":{"benchmark":"^2.1.4","canonicalize":"^2.0.0","fast-json-stable-stringify":"latest","fast-safe-stringify":"latest","fast-stable-stringify":"latest","faster-stable-stringify":"latest","fastest-stable-stringify":"latest","json-canonicalize":"^1.0.5","json-stable-stringify":"latest","json-stringify-deterministic":"latest","json-stringify-safe":"latest","safe-stable-stringify":"latest","slump":"^3.0.2"},"directories":{"example":"examples","test":"test"},"gitHead":"54dcef1013b0fe3be6b7b19927ba983e452c1386","_id":"json-canon@1.0.1","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-PQcj4PFOTAQxE8PgoQ4KrM0DcKWZd7S3ELOON8rmysl9I8JuFMgxu1H9v+oZsTPjjkpeS3IHPwLjr7d+gKygnw==","shasum":"ce815a1d02e1b02c97b21154c7a844321e314184","tarball":"https://registry.npmjs.org/json-canon/-/json-canon-1.0.1.tgz","fileCount":10,"unpackedSize":28972,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbIcq/bZ1ahEnXtT3ZBKTb8INWxywqozHQOJqerdiwCQIhALf+YtVH1imjrRRe/JEhBON9Ae5vm9qxVYOYEUFHBjqb"}]},"_npmUser":{"name":"ahdinosaur","email":"michael.williams@enspiral.com"},"maintainers":[{"name":"ahdinosaur","email":"michael.williams@enspiral.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-canon_1.0.1_1683889937740_0.7855378123610917"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-10T11:35:51.414Z","1.0.0":"2023-05-10T11:35:51.610Z","modified":"2023-05-12T11:12:18.049Z","1.0.1":"2023-05-12T11:12:17.944Z"},"maintainers":[{"name":"ahdinosaur","email":"michael.williams@enspiral.com"}],"description":"Serialize JSON into a canonical format.","homepage":"https://github.com/ahdinosaur/json-canon#readme","keywords":["json","jcs","rfc8785","canon","canonical","canonicalize","crypto","hashable","hashing","signable","signing"],"repository":{"type":"git","url":"git+https://github.com/ahdinosaur/json-canon.git"},"contributors":[{"name":"Samuel Erdtman","email":"samuel@erdtman.se"},{"name":"Anders Rundgren","email":"anders.rundgren.net@gmail.com"}],"author":{"name":"Michael Williams","email":"hello@mikey.nz"},"bugs":{"url":"https://github.com/ahdinosaur/json-canon/issues"},"license":"Apache-2.0","readme":"# `json-canon`\n\n## Install\n\n```shell\nnpm install json-canon\n```\n\n## Example\n\n```js\nconst serialize = require('json-canon')\n\nconst json = {\n  from_account: \"543 232 625-3\",\n  to_account: \"321 567 636-4\",\n  amount: 500,\n  currency: \"USD\"\n}\n\nconsole.log(serialize(json))\n// {\"amount\":500,\"currency\":\"USD\",\"from_account\":\"543 232 625-3\",\"to_account\":\"321 567 636-4\"}\n```\n\nSee [`./examples/basic.js`](./examples/basic.js)\n\n## Usage\n\n### `serialize = require('json-canon')`\n\n```ts\nfunction serialize(input: unknown): string;\n```\n\n## Bench\n\n```txt\njson-canon x 44,441 ops/sec ±0.42% (91 runs sampled)\nJSON.stringify x 101,970 ops/sec ±0.37% (90 runs sampled)\nfast-json-stable-stringify x 30,066 ops/sec ±0.35% (95 runs sampled)\njson-stable-stringify x 23,099 ops/sec ±0.50% (93 runs sampled)\nfast-stable-stringify x 35,560 ops/sec ±0.23% (91 runs sampled)\njson-stringify-deterministic x 18,521 ops/sec ±0.37% (95 runs sampled)\nfaster-stable-stringify x 28,588 ops/sec ±0.20% (96 runs sampled)\nfast-safe-stringify x 83,523 ops/sec ±0.23% (98 runs sampled)\nsafe-stable-stringify x 50,807 ops/sec ±0.26% (94 runs sampled)\ncanonicalize x 28,365 ops/sec ±0.79% (93 runs sampled)\njson-canonicalize x 30,372 ops/sec ±0.56% (89 runs sampled)\nThe fastest is JSON.stringify\n```\n\n## License\n\n```txt\nCopyright 2023 Michael Williams\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n## Related\n\n- [`canonicalize`](https://github.com/erdtman/canonicalize)\n- [`json-canonicalize`](https://github.com/snowyu/json-canonicalize.ts)\n","readmeFilename":"README.md"}