{"id":18300391,"url":"https://github.com/jpdevries/jsonarea","last_synced_at":"2025-04-09T09:27:08.165Z","repository":{"id":140005358,"uuid":"51630259","full_name":"jpdevries/JSONarea","owner":"jpdevries","description":"JSON Validated Textarea. Lightweight and Unopinionated.","archived":false,"fork":false,"pushed_at":"2016-03-21T11:20:37.000Z","size":9,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T03:32:49.149Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpdevries.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-13T03:26:09.000Z","updated_at":"2018-03-20T12:21:53.000Z","dependencies_parsed_at":"2023-06-17T10:30:52.094Z","dependency_job_id":null,"html_url":"https://github.com/jpdevries/JSONarea","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2FJSONarea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2FJSONarea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2FJSONarea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpdevries%2FJSONarea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpdevries","download_url":"https://codeload.github.com/jpdevries/JSONarea/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248010725,"owners_count":21032968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T15:12:12.467Z","updated_at":"2025-04-09T09:27:08.127Z","avatar_url":"https://github.com/jpdevries.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSONarea\nJSON Validated Textarea. Lightweight and without opinion.\n\nIf you are using a HTML `\u003ctextarea\u003e` to allow your users to insert JSON, JSONarea was made just for you. JSONarea prides itself on what it does not do more than what it does\u0026nbsp;do.\n\n#### does:\n - Listens to input events on a textarea and dispatches an update event indiciating whether or not the input is valid\u0026nbsp;JSON.\n - allows you to configure the events it listens\u0026nbsp;to\n - allows you to extend JSONarea with any number of\u0026nbsp;Objects\n\n#### doesn't:\n - Hit the\u0026nbsp;DOM\n - require any third party\u0026nbsp;dependencies\n\n## Configuration\n\n| Name          | Description                                       | Default\n| ------------- |:-------------------------------------------------:| -----\n| events        | Array of events to listen\u0026nbsp;to                      | `['change','keyup']`\n| sourceObjects | Optional Array of objects to extend JSONArea\u0026nbsp;with |   `[]`\n\n## Usage\n\n```js\n// do the deal\nvar myJSONArea = JSONArea(document.getElementById('json'),{\n  sourceObjects:[] // optional array of objects for JSONArea to inherit from\n});\n\n// then here's how you use JSONArea's update event\nmyJSONArea.getElement().addEventListener('update',function(e){\n  if(e.detail.isJSON) {\n    // do something\n  } else {\n    // do something else\n  }\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpdevries%2Fjsonarea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpdevries%2Fjsonarea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpdevries%2Fjsonarea/lists"}