{
  "_id": "@tufjs/canonical-json",
  "maintainers": [
    {
      "name": "eugenethehub",
      "email": "ejahngithub@github.com"
    },
    {
      "name": "bdehamer",
      "email": "brian@dehamer.com"
    }
  ],
  "keywords": [
    "json",
    "canonical",
    "canonicalize",
    "canonicalization",
    "crypto",
    "signature",
    "olpc"
  ],
  "dist-tags": {
    "latest": "2.0.0"
  },
  "author": {
    "name": "bdehamer@github.com"
  },
  "_rev": "1-0e8a3a3f3cd7742f0607ec366e259900",
  "description": "OLPC JSON canonicalization",
  "readme": "# @tufjs/canonical-json\n\nJSON canonicalization compliant with the [OLPC Canonical JSON specification][1].\n\n## Why\n\nIf you're looking for [RFC 8785][2] compliant JSON canonicalization there are\n[any][3] [number][4] [of][5] [libraries][6] [to][7] [choose][8] [from][9].\nYou should only select this library if you know that you specifically need\nsupport for the [OLPC][1]-style of canonicalization.\n\nOne reason you might chose OLPC compliance is for interoperability with\n[The Update Framework][10] which specifically calls out OLPC as the\ncanonicalization standard for computing signatures over TUF metadata.\n\nThe canonicalized strings generated by this library are compatible with those\ngenerated by the Python-based [securesystemslib][11] library and the Go-based\n[go-securesystemslib][12] library.\n\n## Installation\n\n```console\nnpm install @tufjs/canonical-json\n```\n\n## Usage\n\n```javascript\nconst json = require('@tufjs/canonical-json')\n\nconst obj = {\n  bool: true,\n  num: 42,\n  ary: [1, 2, 3],\n  str: \"foo\\\\bar\"\n}\n\nconsole.log(json.canonicalize(obj))\n// output: {\"ary\":[1,2,3],\"bool\":true,\"num\":42,\"str\":\"foo\\\\bar\"}\n```\n\n[1]: https://wiki.laptop.org/go/Canonical_JSON\n[2]: https://www.rfc-editor.org/rfc/rfc8785\n[3]: https://www.npmjs.com/package/@stratumn/canonicaljson\n[4]: https://www.npmjs.com/package/@truestamp/canonify\n[5]: https://www.npmjs.com/package/canonical-json\n[6]: https://www.npmjs.com/package/canonicalize\n[7]: https://www.npmjs.com/package/canonicalize-json\n[8]: https://www.npmjs.com/package/json-canonicalize\n[9]: https://www.npmjs.com/package/another-json\n[10]: https://theupdateframework.github.io/specification/latest/#metaformat\n[11]: https://github.com/secure-systems-lab/securesystemslib\n[12]: https://github.com/secure-systems-lab/go-securesystemslib\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/theupdateframework/tuf-js.git"
  },
  "bugs": {
    "url": "https://github.com/theupdateframework/tuf-js/issues"
  },
  "license": "MIT",
  "versions": {
    "1.0.0": {
      "name": "@tufjs/canonical-json",
      "version": "1.0.0",
      "description": "OLPC JSON canonicalization",
      "main": "lib/index.js",
      "typings": "lib/index.d.ts",
      "license": "MIT",
      "keywords": [
        "json",
        "canonical",
        "canonicalize",
        "canonicalization",
        "crypto",
        "signature",
        "olpc"
      ],
      "author": {
        "name": "bdehamer@github.com"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/theupdateframework/tuf-js.git"
      },
      "homepage": "https://github.com/theupdateframework/tuf-js/packages/canonical-json#readme",
      "bugs": {
        "url": "https://github.com/theupdateframework/tuf-js/issues"
      },
      "scripts": {
        "test": "jest"
      },
      "devDependencies": {
        "@types/node": "^18.14.1",
        "typescript": "^4.9.5"
      },
      "engines": {
        "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
      },
      "gitHead": "fa220414120d267cd5febc7acd2d4795bd9d307d",
      "_id": "@tufjs/canonical-json@1.0.0",
      "_nodeVersion": "16.19.1",
      "_npmVersion": "9.6.0",
      "dist": {
        "integrity": "sha512-QTnf++uxunWvG2z3UFNzAoQPHxnSXOwtaI3iJ+AohhV+5vONuArPjJE7aPXPVXfXJsqrVbZBu9b81AJoSd09IQ==",
        "shasum": "eade9fd1f537993bc1f0949f3aea276ecc4fab31",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz",
        "fileCount": 5,
        "unpackedSize": 5862,
        "attestations": {
          "url": "https://registry.npmjs.org/-/npm/v1/attestations/@tufjs%2fcanonical-json@1.0.0",
          "provenance": {
            "predicateType": "https://slsa.dev/provenance/v0.2"
          }
        },
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIAiu2VGobmaPZLxsWm93Sxn+cRyQyPq8qJpV8UDIIw7SAiAvvficDrqYWGgLrBr09EDhblq1lYEV1tqovtVeCseQHA=="
          }
        ],
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBk+OACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrvSQ//QqiR1Dx05lgcut2im7W6ml/pVAWerMgcLVqeeMuCfOKCls29\r\nhNQLIMJxBIqXcVuQ6+zZl97D+TfcpEG9m7UHBnRRPEPub1BG2QaZWdbLIrbm\r\nXWw6ZRXZmkgOgSJax4KlP8hx6z5UUeVRMPnlvgrJ5XQeHyfhvzoUEj3Dr6Mk\r\ny+zihYlcF9VsgOqd6Z1h6hCx+OfxQ+fau5e0XfZ2olVbbWCIORe6bOKRBtqL\r\nSz4MnL7bwPK4sv7ZwU6m0q3pVrBJtHaEbXsdqZi2YNH3qbwQaQ44QduhUqSd\r\n1mtcemeXtTFPNEdDkCv087NP2RAi9DZzm1jk/8shqZwQzlapULCs1rjmgTCd\r\nMQ+8QcrCN4c6sAMOUHrxt3YIEXd6Kr7DD8s8IFkbRu4t0jnPNp+uRZOGI9CQ\r\nD5ZKCAATrDu2h37vu08bi6qTYXCE5dTCmozxhDRk50QXvhZh5byzxYmSUXV4\r\nIZ3tWIrVMhaYrXze2i74eX6wiwRvH8a+zDjCpn3Wvme053sIeFvYTV1Pxo0b\r\nt2iPGurPF20bqKWEpwqNyB3jxXpS63RZ1PmDB4/OKH1Aod9HGSMBAX/obZQE\r\n3/YGFsl9BDKMSXhWX/ah0AxZEoDurDoaAWKI32A3+9kCbqq4R8K9hDEEbDeA\r\n0V5JxKyJ04X36Iy+ybFyDrm3n7Pnq7gZMfc=\r\n=Zf23\r\n-----END PGP SIGNATURE-----\r\n"
      },
      "_npmUser": {
        "name": "eugenethehub",
        "email": "ejahngithub@github.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "eugenethehub",
          "email": "ejahngithub@github.com"
        },
        {
          "name": "bdehamer",
          "email": "brian@dehamer.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/canonical-json_1.0.0_1678135181650_0.8995012088122474"
      },
      "_hasShrinkwrap": false
    },
    "2.0.0": {
      "name": "@tufjs/canonical-json",
      "version": "2.0.0",
      "description": "OLPC JSON canonicalization",
      "main": "lib/index.js",
      "typings": "lib/index.d.ts",
      "license": "MIT",
      "keywords": [
        "json",
        "canonical",
        "canonicalize",
        "canonicalization",
        "crypto",
        "signature",
        "olpc"
      ],
      "author": {
        "name": "bdehamer@github.com"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/theupdateframework/tuf-js.git"
      },
      "homepage": "https://github.com/theupdateframework/tuf-js/tree/main/packages/canonical-json#readme",
      "bugs": {
        "url": "https://github.com/theupdateframework/tuf-js/issues"
      },
      "scripts": {
        "test": "jest"
      },
      "engines": {
        "node": "^16.14.0 || >=18.0.0"
      },
      "_id": "@tufjs/canonical-json@2.0.0",
      "gitHead": "95fca28717d763c570ce243c4b1efdac577d0962",
      "_nodeVersion": "16.20.1",
      "_npmVersion": "9.8.1",
      "dist": {
        "integrity": "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==",
        "shasum": "a52f61a3d7374833fca945b2549bc30a2dd40d0a",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz",
        "fileCount": 5,
        "unpackedSize": 5774,
        "attestations": {
          "url": "https://registry.npmjs.org/-/npm/v1/attestations/@tufjs%2fcanonical-json@2.0.0",
          "provenance": {
            "predicateType": "https://slsa.dev/provenance/v1"
          }
        },
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIH2aMraASFVB0+A3hICHk4lqh31QVUb3NdAc3QZXve01AiAJ0tT3b+ptaoYoiUgkKBSjt1jG+WEg6Eeoop6JHCNomQ=="
          }
        ]
      },
      "_npmUser": {
        "name": "eugenethehub",
        "email": "ejahngithub@github.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "eugenethehub",
          "email": "ejahngithub@github.com"
        },
        {
          "name": "bdehamer",
          "email": "brian@dehamer.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/canonical-json_2.0.0_1692295059709_0.8790509572412155"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "@tufjs/canonical-json",
  "time": {
    "created": "2023-03-06T20:39:41.571Z",
    "1.0.0": "2023-03-06T20:39:41.843Z",
    "modified": "2026-05-13T13:51:04.847Z",
    "2.0.0": "2023-08-17T17:57:39.856Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/theupdateframework/tuf-js/tree/main/packages/canonical-json#readme"
}