{"name":"@codemirror/lang-json","version":"6.0.2","keywords":["editor","code"],"author":{"url":"http://marijnhaverbeke.nl","name":"Marijn Haverbeke","email":"marijn@haverbeke.berlin"},"license":"MIT","_id":"@codemirror/lang-json@6.0.2","maintainers":[{"name":"adrianheine","email":"mail@adrianheine.de"},{"name":"marijn","email":"marijn@haverbeke.berlin"}],"homepage":"https://github.com/codemirror/lang-json#readme","bugs":{"url":"https://github.com/codemirror/lang-json/issues"},"dist":{"shasum":"054b160671306667e25d80385286049841836179","tarball":"http://registry-npm.ywwl.com/@codemirror/lang-json/download/@codemirror/lang-json-6.0.2.tgz","fileCount":9,"integrity":"sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==","signatures":[{"sig":"MEUCIQCwv6sWnoqLxDgPuZCXbiaY6HI5aVdnEaWqgK98zqFdSAIgNAzejWDYdGfBSzhpUtbEIFgwlO5QjeomnS0nFuIPM7o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10751,"size":3665,"noattachment":false,"key":"/@codemirror/lang-json/-/@codemirror/lang-json-6.0.2.tgz"},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"ef0c630e5f3735f3c8c1c3d39ea10cde0046cc85","scripts":{"test":"cm-runtests","prepare":"cm-buildhelper src/json.ts"},"_npmUser":{"name":"marijn","actor":{"name":"marijn","type":"user","email":"marijn@haverbeke.berlin"},"email":"marijn@haverbeke.berlin"},"repository":{"url":"git+https://github.com/codemirror/lang-json.git","type":"git"},"_npmVersion":"11.3.0","description":"JSON language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"@lezer/json":"^1.0.0","@codemirror/language":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@codemirror/buildhelper":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/lang-json_6.0.2_1750334106482_0.30725592714663175","host":"s3://npm-registry-packages-npm-production"},"readme":"<!-- NOTE: README.md is generated from src/README.md -->\n\n# @codemirror/lang-json [![NPM version](https://img.shields.io/npm/v/@codemirror/lang-json.svg)](https://www.npmjs.org/package/@codemirror/lang-json)\n\n[ [**WEBSITE**](https://codemirror.net/) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/lang-json/blob/main/CHANGELOG.md) ]\n\nThis package implements JSON language support for the\n[CodeMirror](https://codemirror.net/) code editor.\n\nThe [project page](https://codemirror.net/) has more information, a\nnumber of [examples](https://codemirror.net/examples/) and the\n[documentation](https://codemirror.net/docs/).\n\nThis code is released under an\n[MIT license](https://github.com/codemirror/lang-json/tree/main/LICENSE).\n\nWe aim to be an inclusive, welcoming community. To make that explicit,\nwe have a [code of\nconduct](http://contributor-covenant.org/version/1/1/0/) that applies\nto communication around the project.\n\n## Usage\n\n```javascript\nimport {EditorView, basicSetup} from \"codemirror\"\nimport {json} from \"@codemirror/lang-json\"\n\nconst view = new EditorView({\n  parent: document.body,\n  doc: `{\"version\": \"9.99.99\", \"data\": [1, 2, 3]}`,\n  extensions: [basicSetup, json()]\n})\n```\n\n## API Reference\n\n<dl>\n<dt id=\"user-content-json\">\n  <code><strong><a href=\"#user-content-json\">json</a></strong>() → <a href=\"https://codemirror.net/docs/ref#language.LanguageSupport\">LanguageSupport</a></code></dt>\n\n<dd><p>JSON language support.</p>\n</dd>\n<dt id=\"user-content-jsonlanguage\">\n  <code><strong><a href=\"#user-content-jsonlanguage\">jsonLanguage</a></strong>: <a href=\"https://codemirror.net/docs/ref#language.LRLanguage\">LRLanguage</a></code></dt>\n\n<dd><p>A language provider that provides JSON parsing.</p>\n</dd>\n<dt id=\"user-content-jsonparselinter\">\n  <code><strong><a href=\"#user-content-jsonparselinter\">jsonParseLinter</a></strong>() → fn(<a id=\"user-content-jsonparselinter^returns^view\" href=\"#user-content-jsonparselinter^returns^view\">view</a>: <a href=\"https://codemirror.net/docs/ref#view.EditorView\">EditorView</a>) → <a href=\"https://codemirror.net/docs/ref#lint.Diagnostic\">Diagnostic</a>[]</code></dt>\n\n<dd><p>Calls\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse\"><code>JSON.parse</code></a>\non the document and, if that throws an error, reports it as a\nsingle diagnostic.</p>\n</dd>\n</dl>\n","publish_time":1750334106657,"_cnpm_publish_time":1750334106657,"dist-tags":{"latest":"6.0.2"}}