{"_id":"json-types","_rev":"139848","name":"json-types","description":"JSON TypeScript Definitions","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"robjtede","email":"robjtede@icloud.com"}],"time":{"modified":"2021-06-03T11:26:15.000Z","created":"2017-08-28T00:14:36.971Z","1.0.2":"2020-03-23T00:52:38.265Z","1.0.1":"2020-03-22T22:39:12.721Z","1.0.0":"2017-08-28T00:14:36.971Z"},"users":{},"author":{"name":"robjtede"},"repository":{"type":"git","url":"git+https://github.com/robjtede/json-types.git"},"versions":{"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":{"shasum":"f4a95f04b4565422aa84fdad487a4f4667619dc6","size":2465,"noattachment":false,"key":"/json-types/-/json-types-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-types/download/json-types-1.0.2.tgz"},"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,"publish_time":1584924758265,"_cnpm_publish_time":1584924758265},"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":{"shasum":"b00bd8b458b0df3bcd141c60811ec5a25f97773a","size":2466,"noattachment":false,"key":"/json-types/-/json-types-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-types/download/json-types-1.0.1.tgz"},"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,"publish_time":1584916752721,"_cnpm_publish_time":1584916752721,"deprecated":"JSON type workaround is not necessary since TypeScript 3.7. See project readme for replacement snippet."},"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":{"shasum":"af36ae36ff9eec2bc20f7ed21e6403c967609c38","size":2086,"noattachment":false,"key":"/json-types/-/json-types-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/json-types/download/json-types-1.0.0.tgz"},"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":{},"publish_time":1503879276971,"_cnpm_publish_time":1503879276971,"_hasShrinkwrap":false,"deprecated":"JSON type workaround is not necessary since TypeScript 3.7. See project readme for replacement snippet."}},"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","_attachments":{},"homepage":"https://github.com/robjtede/json-types#readme","bugs":{"url":"https://github.com/robjtede/json-types/issues"},"license":"MIT"}