{"_id":"@allnulled/jsontyped","_rev":"2-f8654ee91f47d3be0ee13df9050a1bf5","name":"@allnulled/jsontyped","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@allnulled/jsontyped","version":"1.0.0","keywords":["json","extension"],"author":{"name":"allnulled"},"license":"WTFPL","_id":"@allnulled/jsontyped@1.0.0","maintainers":[{"name":"allnulled","email":"todosanulados@gmail.com"}],"dist":{"shasum":"20e14ff0de03e7dcf06f2cea8e9199439c867753","tarball":"https://registry.npmjs.org/@allnulled/jsontyped/-/jsontyped-1.0.0.tgz","fileCount":6,"integrity":"sha512-Kwvbw0ODyIiV3LcYE1YzMGNAIn+tlQ5RjgAYtbomWpYPysgoL8NjImb0B8BeNlIhc38+GBVkTKDHG1FdRRY8kQ==","signatures":[{"sig":"MEUCIBkRSt/NA6tNwO1kIT7q+zFv7zbYoKHCP7tQJXJ0m27zAiEAkpxDoFUwqWgh5A0aHcpHaes9SuvgoQsol271EOhQmQM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38773},"main":"jsontyped.js","gitHead":"74e7c98614e0500bbd872f3f6b03fd18e40e123d","scripts":{"test":"npx mocha test.js","build":"npx pegjs jsontyped.pegjs && node fix.js"},"_npmUser":{"name":"allnulled","email":"todosanulados@gmail.com"},"_npmVersion":"9.6.7","description":"JSON extension to support external types","directories":{},"_nodeVersion":"18.17.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jsontyped_1.0.0_1735326184548_0.023790487826817586","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@allnulled/jsontyped","version":"1.0.1","keywords":["json","extension"],"author":{"name":"allnulled"},"license":"WTFPL","_id":"@allnulled/jsontyped@1.0.1","maintainers":[{"name":"allnulled","email":"todosanulados@gmail.com"}],"dist":{"shasum":"d14a34c0d5fb12b439b6d579b8702989feba8616","tarball":"https://registry.npmjs.org/@allnulled/jsontyped/-/jsontyped-1.0.1.tgz","fileCount":7,"integrity":"sha512-8skPg2k4yrnQLLVc3bBSUCU5u8qA6ekhKWk4OmZbtUz4BY82VEBVeCZWyXfzwQRFovQTMayQBiiqzHV2zPXAuw==","signatures":[{"sig":"MEQCIBd4QmzUupJ/rcrN4evOR8bt+2oEvZkZPs70bLrZ+Q7vAiATtR+INjMo8V95mD3668gsbQVX8TSALZjCPzwlQlRHiw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44198},"main":"jsontyped.js","gitHead":"4f4df793a60ed1817b68465ff75d362cce9d2cc0","scripts":{"up":"bash up.sh","test":"npx mocha test.js","build":"npx pegjs jsontyped.pegjs && node fix.js"},"_npmUser":{"name":"allnulled","email":"todosanulados@gmail.com"},"_npmVersion":"9.6.7","description":"JSON extension to support external types","directories":{},"_nodeVersion":"18.17.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jsontyped_1.0.1_1735327966331_0.7904725477920957","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@allnulled/jsontyped","version":"1.0.2","description":"JSON extension to support external types","main":"jsontyped.js","scripts":{"build":"npx pegjs jsontyped.pegjs && node fix.js","test":"npm run build && npx mocha test.js","up":"bash up.sh"},"keywords":["json","extension"],"author":{"name":"allnulled"},"license":"WTFPL","gitHead":"f0c2f6487be2cffe6f8565dcf3c1d4b1df963fa1","_id":"@allnulled/jsontyped@1.0.2","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-VMc2ToTFbxLJCnU4z/DKjJcOlpj8G0Y131aDWXrJz9AbhJbGANU1U5vjDrMmnICwC+jfPeSc68lXG6HUb8T8vg==","shasum":"7042e3aab1558ce7287416b89c60e9cfe8f48d97","tarball":"https://registry.npmjs.org/@allnulled/jsontyped/-/jsontyped-1.0.2.tgz","fileCount":7,"unpackedSize":55797,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC10NjiKGBAPW0prBqBHrFrt3jeMKh4kQCma32k/LA9cQIhAIW1F1RhDiCLJVf14RuIHyqOZ9HJ8h5H/1zTxWJfppKo"}]},"_npmUser":{"name":"allnulled","email":"todosanulados@gmail.com"},"directories":{},"maintainers":[{"name":"allnulled","email":"todosanulados@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jsontyped_1.0.2_1737567738735_0.7558430579400144"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-27T19:03:03.957Z","modified":"2025-01-22T17:42:19.119Z","1.0.0":"2024-12-27T19:03:04.712Z","1.0.1":"2024-12-27T19:32:46.528Z","1.0.2":"2025-01-22T17:42:18.944Z"},"author":{"name":"allnulled"},"license":"WTFPL","keywords":["json","extension"],"description":"JSON extension to support external types","maintainers":[{"name":"allnulled","email":"todosanulados@gmail.com"}],"readme":"# jsontyped\n\nTo support types in JSON.\n\n## Installation\n\n```sh\nnpm i -s @allnulled/jsontyped\n```\n\n## Importation\n\nIn node.js:\n\n```js\nrequire(\"@allnulled/jsontyped\");\n```\n\nIn html:\n\n```html\n<script src=\"node_modules/@allnulled/jsontyped/jsontyped.js\"></script>\n```\n\n## Usage\n\n```js\nJsonTyped.parse(`\"This could be a normal JSON\"`);\nJsonTyped.parse(`@message \"This is another level of JSON\"`);\nJsonTyped.parse(`@deeper.types \"This is a valid way of chaining ref types\"`);\nJsonTyped.parse(`@deeper/types/somewhere/else.js \"This is also a valid way of chaining ref types\"`);\nJsonTyped.parse(`@file:///you/can/specify/protocol/too \"This is also a valid way of chaining ref types\"`);\nJsonTyped.parse(`@http:///you/can/specify/protocol/too \"This is also a valid way of chaining ref types\"`);\n```\n\nBasically, any type supports this \"prefix\" in which you specify, with these symbols and normal variable-accepted js symbols [A-Za-z_$] +[0-9].\n\nThen it always translate the types to:\n\n```json\n{\n  $protocol: null,\n  $type: \"message\",\n  $value: \"This is another level of JSON\"\n}\n```\n\nWhich is also quite readable. You can customize the output re-building the parser, by `npm run build`.\n\n## Changelog\n\n**22 of January of 2025.**\n\n  - Accepts URLs with protocol, host, path, querystring and section automatically parsed.\n  - Accepts also JavaScript object paths separated by \"`.`\".","readmeFilename":"README.md"}