{"_id":"json-types","_rev":"7-0f3ecef2b404c545fe244ba958cf1684","name":"json-types","time":{"modified":"2022-05-06T22:23:35.929Z","created":"2017-08-27T23:49:29.715Z","0.1.0":"2017-08-27T23:49:29.715Z","1.0.0":"2017-08-28T00:14:36.971Z","1.0.1":"2020-03-22T22:39:12.721Z","1.0.2":"2020-03-23T00:52:38.265Z"},"maintainers":[{"name":"robjtede","email":"robjtede@icloud.com"}],"dist-tags":{"latest":"1.0.2"},"description":"JSON TypeScript Definitions","readme":"## Deprecation Notice\n\nAs of TypeScript 3.7, it's no longer necessary to use the workaround in this\npackage for defining valid JSON structures.\n\nThis small snippet is all that is required now:\n\n```typescript\ntype Json =\n  | string\n  | number\n  | boolean\n  | null\n  | { [key: string]: Json }\n  | Json[];\n```\n\n---\n\n# json-types\n\n> JSON TypeScript Definitions\n>\n> A simple typescript definition module that simplifies type checking for valid JSON objects. Useful for defining interfaces and parameter type checking.\n\n## Installation\n\n```shell\nnpm i json-types\n```\n\n## Usage\n\n```typescript\nimport {\n  Primitive,\n  JSONEntry,\n  JSONArray,\n  JSONMap,\n  JSONData\n} from '../json-types'\n```\n\n### Use Case\n\n```typescript\nimport {\n  Primitive,\n  JSONEntry,\n  JSONArray,\n  JSONMap,\n  JSONData\n} from '../json-types'\n\ninterface QueryString {\n  [key: string]: Primitive | undefined\n}\n\ninterface APIResponse extends JSONMap {\n  address: {\n    house_no: number\n    street: string\n  }\n  name: string,\n  has_website: false\n  files: JSONArray\n  metadata: JSONEntry\n}\n\nfunction httpGet (url: string): Promise<JSONData> {\n  return requestPromise(url, {\n    json: true\n  })\n}\n```\n","versions":{"1.0.0":{"name":"json-types","version":"1.0.0","description":"JSON TypeScript Definitions","main":"index.js","scripts":{"clean":"rimraf ./*.js && rimraf ./*.d.ts","build":"npm run clean && tsc","test":"echo \"Error: no test specified\" && exit 1","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/robjtede/json-types.git"},"keywords":["json","typescript","types","tsd","typings"],"author":{"name":"robjtede"},"license":"MIT","bugs":{"url":"https://github.com/robjtede/json-types/issues"},"homepage":"https://github.com/robjtede/json-types#readme","devDependencies":{"rimraf":"^2.6.1","tslib":"^1.7.1","typescript":"^2.4.2"},"gitHead":"8bd34117b8ce78e7a55878d332c6aaecd6c9fa76","_id":"json-types@1.0.0","_npmVersion":"5.4.0","_nodeVersion":"7.10.0","_npmUser":{"name":"robjtede","email":"robjtede@icloud.com"},"dist":{"integrity":"sha512-zdiB/jG86MVtN7nLU0PTNoKDgZjW+/y78C8ZOK7MYTTvPpHqewmJLxuKAPWgEywS4dmnwpiuSmyxl0bXeIrLzQ==","shasum":"af36ae36ff9eec2bc20f7ed21e6403c967609c38","tarball":"https://registry.npmjs.org/json-types/-/json-types-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYMODqmUUkzKJrFd7pU4zpT05sxMw/rqmcMJ2O6RYrhQIhAPV5r17wWZ0Rmbv28LgSH0EEfGQ0/jTxxCrt8a82MyUX"}]},"maintainers":[{"name":"robjtede","email":"robjtede@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-types-1.0.0.tgz_1503879275787_0.9821961445268244"},"directories":{},"deprecated":"JSON type workaround is not necessary since TypeScript 3.7. See project readme for replacement snippet."},"1.0.1":{"name":"json-types","version":"1.0.1","description":"JSON TypeScript Definitions","main":"index.js","scripts":{"clean":"rimraf ./*.js && rimraf ./*.d.ts","build":"npm run clean && tsc","test":"echo \"Error: no test specified\" && exit 1","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/robjtede/json-types.git"},"keywords":["json","typescript","types","tsd","typings"],"author":{"name":"robjtede"},"license":"MIT","bugs":{"url":"https://github.com/robjtede/json-types/issues"},"homepage":"https://github.com/robjtede/json-types#readme","devDependencies":{"rimraf":"^2.6.1","tslib":"^1.7.1","typescript":"^2.4.2"},"gitHead":"edf1af1f7f5ec4b7743f76a6b24005bd8b8a9ab7","_id":"json-types@1.0.1","_nodeVersion":"12.14.0","_npmVersion":"6.14.1","dist":{"integrity":"sha512-GChOhJ8ETyYOYKlVf5iofh9haDoCrQmncejokR/XLufNzxnUh/8Lv5uXz+P/DqMjYNkBx4hqezaC80U8q3eloQ==","shasum":"b00bd8b458b0df3bcd141c60811ec5a25f97773a","tarball":"https://registry.npmjs.org/json-types/-/json-types-1.0.1.tgz","fileCount":8,"unpackedSize":4820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJed+kRCRA9TVsSAnZWagAAt7cP/iDr9i/HEbg2QngJpaNj\n8pjoga2pR8+SFF1FgamNXlTRYXRg8PdANtHcn0myXGKv1jyOCPGj9jzNnpSG\nPs6qmc+532SwjbHSoayE1IpVB6hjKFb7G9etfkXOzq1uXMUIrpC5HUDgrxKO\nXdxQwE9krdAZFM5YESBY0QSWdPKG4L/mD5rK8WOVL0xZcD3wi3i5JGLGjq8f\nPsk+xm8EQESDbj6xDB8fHuHCN+JOA7+6bq0Yiq1RMOxSy3H6PovDH+ufmx5z\n1W+3q4ZR9CPZiJwd+ApJUvEgw4PTazWCNYWa1q11gpjb1GEbntzPw4UDhT4X\nzLyghHL2dVUDkJGe2+0EXugk0IsUAtcGGlg5zc7VdYaRkgoGOHTp8TvRvxQH\n6MMb18zsIChukRxH6YfmEsuBoQFZf0168HhFoUiVHtYvciAg/XlPbOieTHf2\n5XoMxhKblKsepW5ERJH6qqVTmm9KK+oRZdN2yCQtRN6VVMi0inBhR4mfZNpe\nO0ayNFfkVlEOabAU21Xt7DPSf/fmQtV3V+Bh3czfwSCI8HX6ap7xGh64Sxre\n2b4hn8L1b2H4gI4sGFqSkvWkUbasuBtZRoSitKoco7oASZxjaUumGqqNDeFU\nWmbh8/5Rxc95rd53yBvE8f0tDVVQSBP/xGBdBGXNoR/hH9qhk2IeaD/xb5Aj\npdk3\r\n=IvDw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFAHpCOIKlNgRMBT3LEV/ZQGrxk4kFRYyp5jOur9F6g4AiAjTV2qXygqZndCFvIlwehigUHlH3tcP4VPcDTIo9DTtg=="}]},"maintainers":[{"name":"robjtede","email":"robjtede@icloud.com"}],"_npmUser":{"name":"robjtede","email":"robjtede@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-types_1.0.1_1584916752558_0.9126424594978211"},"_hasShrinkwrap":false,"deprecated":"JSON type workaround is not necessary since TypeScript 3.7. See project readme for replacement snippet."},"1.0.2":{"name":"json-types","version":"1.0.2","description":"JSON TypeScript Definitions","main":"index.js","scripts":{"clean":"rimraf ./*.js && rimraf ./*.d.ts","build":"npm run clean && tsc","test":"echo \"Error: no test specified\" && exit 1","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/robjtede/json-types.git"},"keywords":["json","typescript","types","tsd","typings"],"author":{"name":"robjtede"},"license":"MIT","bugs":{"url":"https://github.com/robjtede/json-types/issues"},"homepage":"https://github.com/robjtede/json-types#readme","devDependencies":{"rimraf":"^2.6.1","tslib":"^1.7.1","typescript":"^2.4.2"},"gitHead":"85897eed1dfe3d55f57b9a2fc38b06712090c945","_id":"json-types@1.0.2","_nodeVersion":"12.14.0","_npmVersion":"6.14.1","dist":{"integrity":"sha512-+tJ5aFigXBEd/jQVbWsApsz6hIon7neeUJC61E99S6kMYzZSYuRokaQR/n47ntljHlGT8G9XUgTbv5FrPu139w==","shasum":"f4a95f04b4565422aa84fdad487a4f4667619dc6","tarball":"https://registry.npmjs.org/json-types/-/json-types-1.0.2.tgz","fileCount":8,"unpackedSize":4823,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeAhWCRA9TVsSAnZWagAAQqAP/07OxG6KJhRqYlvsUsUR\na5fRIx3lbKBuFCk+hMx8j+cGsI6hb+k02ULYMsKzPwmKiYppXAx4EbTQUczc\njU77Xh9dE2Sz3jrEvcBy8VfN0ZhezAHnlb4RJ+5CTZq/utNyiSh7COplQvZM\nDkyp+u+FlIULqBPnp/shFY5NgUvEATjmTWlQWLuGioCgx/WH+GjCoPcR99N6\nr0Gb1K5A23enDwWsKWeuR9tGtL11u/I0perJsiQGjP7XaGAb5R1WYh4iNaCC\nqNzgVv/pDhb/NMWP8ixlg7O1Pd8xj6KzsADLZi/NZar8+J3X130blw8USiVe\njDs/M1ckmkFoaiOwV5CLQpq2KPeZIIhZCuboRb/UrBK6yxyFr+1bB3Ybhnq6\nUUpTxXZhUtBxxBoN6LA4Yt/hw6I5z9iYNaECKrpBraRBfdM+s5Hq9vzi2JTI\nJLlFALjqnn+eqcbAPT1PrrBjcQY34xHcJDtL2oKjtI3ltfocKQiojc9ofnd/\nyxvOs7pDT2U7PWO/EhQcOwyFOBEONJHcW7Hr8T41WxSZ0EkhIrwkZJjiIxte\n5C5QbcuqNhmtaVLYizScTsqyAY8rlFiJI2cESdajJD8MQZbZZso0vXrN6O/Y\nh4kf7/neVlfh0U6P7vKolEFNvN67Kyi2ctl30HhusnasxLU2mZyzIuvEmJV5\nbzA5\r\n=U9oO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGtUJYmvWRSHwn1EFvY60zhhxgj4yynaV1Y32RVafPEuAiEAi5Y+sxUek9owN73Anr6btZU/vl8C1ctTlb/zampmTK8="}]},"maintainers":[{"name":"robjtede","email":"robjtede@icloud.com"}],"_npmUser":{"name":"robjtede","email":"robjtede@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-types_1.0.2_1584924758054_0.2579967007198247"},"_hasShrinkwrap":false}},"homepage":"https://github.com/robjtede/json-types#readme","keywords":["json","typescript","types","tsd","typings"],"repository":{"type":"git","url":"git+https://github.com/robjtede/json-types.git"},"author":{"name":"robjtede"},"bugs":{"url":"https://github.com/robjtede/json-types/issues"},"license":"MIT","readmeFilename":"README.md"}