{"_id":"parse-json-object","_rev":"203408","name":"parse-json-object","description":"Parse a typed JSON object","dist-tags":{"latest":"3.0.1"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"time":{"modified":"2023-03-21T13:23:04.000Z","created":"2020-08-16T03:23:18.690Z","3.0.1":"2023-01-29T23:58:39.954Z","3.0.0":"2023-01-29T23:50:41.193Z","2.0.1":"2020-10-04T04:41:12.713Z","2.0.0":"2020-09-10T03:15:31.025Z","1.1.0":"2020-09-07T20:14:25.800Z","1.0.6":"2020-09-07T19:30:53.987Z","1.0.5":"2020-09-03T02:19:19.838Z","1.0.4":"2020-09-02T03:28:44.170Z","1.0.3":"2020-08-28T03:14:04.313Z","1.0.2":"2020-08-28T03:12:36.041Z","1.0.1":"2020-08-28T03:01:36.769Z","1.0.0":"2020-08-16T03:23:18.690Z"},"users":{},"author":{"name":"Connor White"},"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"versions":{"3.0.1":{"name":"parse-json-object","version":"3.0.1","description":"Parse a typed JSON object","license":"MIT","private":false,"author":{"name":"Connor White"},"contributors":[{"name":"Connor White"}],"homepage":"https://connorwhite.dev/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"bugs":{"url":"https://github.com/bconnorwhite/parse-json-object/issues"},"keywords":["safe","json","parse","typed","object"],"type":"module","main":".auto/build/index.js","exports":"./.auto/build/index.js","types":".auto/build/index.d.ts","engines":{"node":"^14.13.1 || >=16.0.0"},"scripts":{"build":"auto build","dev":"auto dev","lint":"auto lint","prepack":"yarn build","release":"auto release","test":"auto test","typecheck":"auto typecheck"},"dependencies":{"is-zod":"^1.0.0","types-json":"^4.0.1"},"devDependencies":{"autorepo":"^0.1.9","zod":"^3.20.2"},"eslintConfig":{"extends":"@autosoft/eslint-config"},"jest":{"preset":"@autosoft/jest-preset"},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-auto"},"_id":"parse-json-object@3.0.1","dist":{"shasum":"cdd18bd50959a9917a06126dc464217289001c1b","size":2790,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-3.0.1.tgz","tarball":"http://name.csiicloud.com:7001/parse-json-object/download/parse-json-object-3.0.1.tgz"},"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_3.0.1_1675036719759_0.8751972557764263"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-29T23:58:39.954Z","publish_time":1675036719954,"_cnpm_publish_time":1675036719954},"3.0.0":{"name":"parse-json-object","version":"3.0.0","description":"Parse a typed JSON object","license":"MIT","private":false,"author":{"name":"Connor White"},"contributors":[{"name":"Connor White"}],"homepage":"https://connorwhite.dev/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"bugs":{"url":"https://github.com/bconnorwhite/parse-json-object/issues"},"keywords":["safe","json","parse","typed","object"],"type":"module","main":".auto/build/index.js","exports":"./.auto/build/index.js","types":".auto/build/index.d.ts","engines":{"node":"^14.13.1 || >=16.0.0"},"scripts":{"build":"auto build","dev":"auto dev","lint":"auto lint","prepack":"yarn build","release":"auto release","test":"auto test","typecheck":"auto typecheck"},"dependencies":{"is-zod":"^1.0.0","types-json":"^4.0.1"},"devDependencies":{"autorepo":"^0.1.9","zod":"^3.20.2"},"eslintConfig":{"extends":"@autosoft/eslint-config"},"jest":{"preset":"@autosoft/jest-preset"},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-auto"},"_id":"parse-json-object@3.0.0","dist":{"shasum":"a6c47d6bd4ba63503a03f99b0e5358a7782239b9","size":2642,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-3.0.0.tgz","tarball":"http://name.csiicloud.com:7001/parse-json-object/download/parse-json-object-3.0.0.tgz"},"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_3.0.0_1675036241038_0.34595813031269484"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-29T23:50:41.193Z","publish_time":1675036241193,"_cnpm_publish_time":1675036241193},"2.0.1":{"name":"parse-json-object","version":"2.0.1","description":"Parse a typed JSON object","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"keywords":["safe","json","parse","typed","object"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"dependencies":{"types-json":"^1.2.0"},"devDependencies":{"@bconnorwhite/bob":"^2.9.2"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"parse-json-object@2.0.1","dist":{"shasum":"a441bd8c36d2c33a69516286e7e4138a23607ee0","size":2090,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-2.0.1.tgz","tarball":"http://name.csiicloud.com:7001/parse-json-object/download/parse-json-object-2.0.1.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_2.0.1_1601786472551_0.06313829552074957"},"_hasShrinkwrap":false,"publish_time":1601786472713,"_cnpm_publish_time":1601786472713,"_cnpmcore_publish_time":"2021-12-16T20:55:48.047Z"},"2.0.0":{"name":"parse-json-object","version":"2.0.0","description":"Parse a typed JSON object.","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"keywords":["safe","json","parse","typed","object"],"main":"./build/index.js","scripts":{"build":"bob build","postversion":"git push","prepublishOnly":"yarn build && yarn test","test":"jest"},"dependencies":{"types-json":"^1.2.0"},"devDependencies":{"@bconnorwhite/bob":"^2.1.0","jest":"^26.4.2"},"_id":"parse-json-object@2.0.0","dist":{"shasum":"6f204f0a2a4188bcc04da7542bb08f3d74fe7dfc","size":1802,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/parse-json-object/download/parse-json-object-2.0.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_2.0.0_1599707730897_0.46771096263530554"},"_hasShrinkwrap":false,"publish_time":1599707731025,"_cnpm_publish_time":1599707731025,"_cnpmcore_publish_time":"2021-12-16T20:55:48.272Z"},"1.1.0":{"name":"parse-json-object","version":"1.1.0","description":"Parse a typed JSON object.","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"keywords":["safe","json","parse","typed","object"],"main":"./build/index.js","scripts":{"build":"bob build","postversion":"git push","prepublishOnly":"yarn build"},"dependencies":{"types-json":"^1.0.6"},"devDependencies":{"@bconnorwhite/bob":"^2.0.1"},"_id":"parse-json-object@1.1.0","dist":{"shasum":"eef60211cec368259723d8586ecec7252f8fcdb2","size":1539,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/parse-json-object/download/parse-json-object-1.1.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.1.0_1599509665687_0.28953316697164055"},"_hasShrinkwrap":false,"publish_time":1599509665800,"_cnpm_publish_time":1599509665800,"_cnpmcore_publish_time":"2021-12-16T20:55:48.468Z"},"1.0.6":{"name":"parse-json-object","version":"1.0.6","description":"Parse a typed JSON object.","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"keywords":["safe","json","parse","typed","object"],"main":"./build/index.js","scripts":{"build":"bob build","postversion":"git push","prepublishOnly":"yarn build"},"dependencies":{"types-json":"^1.0.6"},"devDependencies":{"@bconnorwhite/bob":"^2.0.1","@types/node":"^14.0.27"},"_id":"parse-json-object@1.0.6","dist":{"shasum":"0c353dd5cc9a9e1e9275bc7afcaac46a7a23d9b7","size":1149,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.6.tgz","tarball":"http://name.csiicloud.com:7001/parse-json-object/download/parse-json-object-1.0.6.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.6_1599507053802_0.5512055008507466"},"_hasShrinkwrap":false,"publish_time":1599507053987,"_cnpm_publish_time":1599507053987,"_cnpmcore_publish_time":"2021-12-16T20:55:48.663Z"},"1.0.5":{"name":"parse-json-object","version":"1.0.5","description":"Parse a typed JSON object.","author":{"name":"Connor White","email":"connor.bcw@gmail.com"},"license":"MIT","keywords":["safe","json","parse","typed","object"],"homepage":"https://connorwhite.org/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"main":"./build/index.js","scripts":{"build":"bob build","prepublishOnly":"yarn build","postversion":"git push"},"dependencies":{"@bconnorwhite/json-types":"^1.0.5"},"devDependencies":{"@bconnorwhite/bob":"^1.9.7","@types/node":"^14.0.27"},"_id":"parse-json-object@1.0.5","dist":{"shasum":"53fa8c8ec9f6a9648708b9f2ff1d24f5d1f02a4c","size":1132,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.5.tgz","tarball":"http://name.csiicloud.com:7001/parse-json-object/download/parse-json-object-1.0.5.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.5_1599099559730_0.2591189748594358"},"_hasShrinkwrap":false,"publish_time":1599099559838,"_cnpm_publish_time":1599099559838,"_cnpmcore_publish_time":"2021-12-16T20:55:48.889Z"},"1.0.4":{"name":"parse-json-object","version":"1.0.4","description":"Parse a typed JSON object.","author":{"name":"Connor White","email":"connor.bcw@gmail.com"},"license":"MIT","keywords":["safe","json","parse","typed","object"],"homepage":"https://connorwhite.org/github/parse-json-object","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"main":"./build/index.js","scripts":{"build":"bob build","prepublishOnly":"yarn build"},"dependencies":{"@bconnorwhite/json-types":"^1.0.2"},"devDependencies":{"@bconnorwhite/bob":"^1.9.6","@types/node":"^14.0.27"},"_id":"parse-json-object@1.0.4","dist":{"shasum":"873f73dd6863fb390d4c110f265d82c38a0febd9","size":1123,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.4.tgz","tarball":"http://name.csiicloud.com:7001/parse-json-object/download/parse-json-object-1.0.4.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.4_1599017324035_0.4809930074518387"},"_hasShrinkwrap":false,"publish_time":1599017324170,"_cnpm_publish_time":1599017324170,"_cnpmcore_publish_time":"2021-12-16T20:55:49.092Z"},"1.0.3":{"name":"parse-json-object","version":"1.0.3","description":"Parse a typed JSON object.","author":{"name":"Connor White"},"license":"MIT","keywords":["safe","json","parse","typed","object"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"main":"./build/index.js","scripts":{"build":"babel ./src --out-dir ./build --config-file ./babel.config.json --extensions .ts --delete-dir-on-start && tsc --project ./tsconfig.json","prepublishOnly":"yarn build"},"dependencies":{"@bconnorwhite/json-types":"^1.0.2"},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.1","@babel/plugin-transform-runtime":"^7.11.0","@babel/preset-env":"^7.11.0","@babel/preset-typescript":"^7.10.4","@types/node":"^14.0.27","typescript":"^3.9.7"},"_id":"parse-json-object@1.0.3","dist":{"shasum":"c4fd294d5006c06ed1dfa51000c4ef622ef5b163","size":1211,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.3.tgz","tarball":"http://name.csiicloud.com:7001/parse-json-object/download/parse-json-object-1.0.3.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.3_1598584444186_0.9542372325541615"},"_hasShrinkwrap":false,"publish_time":1598584444313,"_cnpm_publish_time":1598584444313,"_cnpmcore_publish_time":"2021-12-16T20:55:49.278Z"},"1.0.2":{"name":"parse-json-object","version":"1.0.2","description":"Parse a typed JSON object.","author":{"name":"Connor White"},"license":"MIT","keywords":["safe","json","parse","typed","object"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"main":"./build/index.js","scripts":{"build":"babel ./src --out-dir ./build --config-file ./babel.config.json --extensions .ts --delete-dir-on-start && tsc --project ./tsconfig.json","prepublishOnly":"yarn build"},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.1","@babel/plugin-transform-runtime":"^7.11.0","@babel/preset-env":"^7.11.0","@babel/preset-typescript":"^7.10.4","@types/node":"^14.0.27","typescript":"^3.9.7"},"dependencies":{"@bconnorwhite/json-types":"^1.0.1","json-types":"^1.0.2"},"_id":"parse-json-object@1.0.2","dist":{"shasum":"f21da86df8ff9e6fdc81a1db01e709d6217d9d61","size":1218,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.2.tgz","tarball":"http://name.csiicloud.com:7001/parse-json-object/download/parse-json-object-1.0.2.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.2_1598584355934_0.6277808695314522"},"_hasShrinkwrap":false,"publish_time":1598584356041,"_cnpm_publish_time":1598584356041,"_cnpmcore_publish_time":"2021-12-16T20:55:49.495Z"},"1.0.1":{"name":"parse-json-object","version":"1.0.1","description":"Parse a typed JSON object.","author":{"name":"Connor White"},"license":"MIT","keywords":["safe","json","parse","typed","object"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"main":"./build/index.js","scripts":{"build":"babel ./src --out-dir ./build --config-file ./babel.config.json --extensions .ts --delete-dir-on-start && tsc --project ./tsconfig.json","prepublishOnly":"yarn build"},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.1","@babel/plugin-transform-runtime":"^7.11.0","@babel/preset-env":"^7.11.0","@babel/preset-typescript":"^7.10.4","@types/node":"^14.0.27","typescript":"^3.9.7"},"dependencies":{"@bconnorwhite/json-types":"^1.0.1"},"_id":"parse-json-object@1.0.1","dist":{"shasum":"bd1924baf8fbf1078446e92eac053b5576f40632","size":1214,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/parse-json-object/download/parse-json-object-1.0.1.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.1_1598583696658_0.7956550953863779"},"_hasShrinkwrap":false,"publish_time":1598583696769,"_cnpm_publish_time":1598583696769,"_cnpmcore_publish_time":"2021-12-16T20:55:49.705Z"},"1.0.0":{"name":"parse-json-object","version":"1.0.0","description":"Parse a typed JSON object.","author":{"name":"Connor White"},"license":"MIT","keywords":["safe","json","parse","typed","object"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/parse-json-object.git"},"main":"./build/index.js","scripts":{"build":"babel ./src --out-dir ./build --config-file ./babel.config.json --extensions .ts --delete-dir-on-start && tsc --project ./tsconfig.json","prepublishOnly":"yarn build"},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.1","@babel/plugin-transform-runtime":"^7.11.0","@babel/preset-env":"^7.11.0","@babel/preset-typescript":"^7.10.4","@types/node":"^14.0.27","typescript":"^3.9.7"},"_id":"parse-json-object@1.0.0","dist":{"shasum":"1b052a8a40818548f5a85488ae28974da64ee088","size":1216,"noattachment":false,"key":"/parse-json-object/-/parse-json-object-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/parse-json-object/download/parse-json-object-1.0.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":""},{"name":"npm:bconnorwhite","email":""}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-json-object_1.0.0_1597548198468_0.46746106662749365"},"_hasShrinkwrap":false,"publish_time":1597548198690,"_cnpm_publish_time":1597548198690,"_cnpmcore_publish_time":"2021-12-16T20:55:49.892Z"}},"readme":"<!--BEGIN HEADER-->\n<div id=\"top\" align=\"center\">\n  <h1>parse-json-object</h1>\n  <a href=\"https://npmjs.com/package/parse-json-object\">\n    <img alt=\"NPM\" src=\"https://img.shields.io/npm/v/parse-json-object.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/parse-json-object\">\n    <img alt=\"TypeScript\" src=\"https://img.shields.io/github/languages/top/bconnorwhite/parse-json-object.svg\">\n  </a>\n  <a href=\"https://coveralls.io/github/bconnorwhite/parse-json-object?branch=master\">\n    <img alt=\"Coverage Status\" src=\"https://img.shields.io/coveralls/github/bconnorwhite/parse-json-object.svg?branch=master\">\n  </a>\n</div>\n\n<br />\n\n<blockquote align=\"center\">Parse a typed JSON object.</blockquote>\n\n<br />\n\n_If I should maintain this repo, please ⭐️_\n<a href=\"https://github.com/bconnorwhite/parse-json-object\">\n  <img align=\"right\" alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/parse-json-object?label=%E2%AD%90%EF%B8%8F&style=social\">\n</a>\n\n_DM me on [Twitter](https://twitter.com/bconnorwhite) if you have questions or suggestions._\n<a href=\"https://twitter.com/bconnorwhite\">\n  <img align=\"right\" alt=\"Twitter\" src=\"https://img.shields.io/twitter/url?label=%40bconnorwhite&style=social&url=https%3A%2F%2Ftwitter.com%2Fbconnorwhite\">\n</a>\n\n---\n<!--END HEADER-->\n- Returns `undefined` if unable to parse\n- Returns value if successful\n\n## Installation\n\n```sh\nyarn add parse-json-object\n```\n\n```sh\nnpm install parse-json-object\n```\n\n```sh\npnpm add parse-json-object\n```\n\n## Usage\n\n### Types\n```ts\nimport {\n  parseJSONValue,\n  parseJSONObject,\n  parseJSONArray,\n  parseString\n} from \"parse-json-object\";\n\nparseJSONValue(\"1\"); // 1\nparseJSONValue(\"not valid json\"); // undefined\n\nparseJSONObject('{\"a\": 1}'); // { a: 1 }\nparseJSONArray(\"[1, 2, 3]\"); // [1, 2, 3]\nparseString('\"hello\"'); // \"hello\"\n```\n\nAdditionally, a `parse` function is provided, which takes a function to validate the parsed value. This can be easily used with [zod](https://github.com/colinhacks/zod) to validate more complex types:\n```ts\nimport { parse } from \"parse-json-object\";\nimport z from \"zod\";\n\nconst schema = z.object({\n  a: z.number(),\n  b: z.string()\n});\n\nparse('{ a: 1, b: \"hello\" }', schema); // { a: 1, b: 'hello' }\n\n```\n\nA custom typeguard can also be used:\n\n```ts\nimport { parse } from \"parse-json-object\";\n\nfunction isNumber(value: unknown): value is number {\n  return typeof value === \"number\";\n}\n\nparse(\"1\", isNumber); // 1\nparse(\"not a number\", isNumber); // undefined\n```\n\n<!--BEGIN FOOTER-->\n\n<br />\n\n<h2 id=\"dependencies\">Dependencies<a href=\"https://www.npmjs.com/package/parse-json-object?activeTab=dependencies\"><img align=\"right\" alt=\"dependencies\" src=\"https://img.shields.io/librariesio/release/npm/parse-json-object.svg\"></a></h2>\n\n- [is-zod](https://www.npmjs.com/package/is-zod): Typeguard to check if a value matches a zod schema\n- [types-json](https://www.npmjs.com/package/types-json): Type checking for JSON values\n\n\n<br />\n\n<h3>Dev Dependencies</h3>\n\n- [autorepo](https://www.npmjs.com/package/autorepo): Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.\n- [zod](https://www.npmjs.com/package/zod): TypeScript-first schema declaration and validation library with static type inference\n\n\n<br />\n\n<h2 id=\"license\">License <a href=\"https://opensource.org/licenses/MIT\"><img align=\"right\" alt=\"license\" src=\"https://img.shields.io/npm/l/parse-json-object.svg\"></a></h2>\n\n[MIT](https://opensource.org/licenses/MIT)\n<!--END FOOTER-->\n\n<br />\n\n## Related Packages:\n\n- [stringify-json-object](https://www.npmjs.com/package/stringify-json-object): Stringify and format a JSON object\n- [types-json](https://www.npmjs.com/package/types-json): Type checking for JSON objects\n","_attachments":{},"homepage":"https://connorwhite.dev/github/parse-json-object","bugs":{"url":"https://github.com/bconnorwhite/parse-json-object/issues"},"license":"MIT"}