{"id":19961806,"url":"https://github.com/xtao-org/jsonstrum","last_synced_at":"2025-05-03T22:31:04.329Z","repository":{"id":43813999,"uuid":"455375972","full_name":"xtao-org/jsonstrum","owner":"xtao-org","description":"A high-level wrapper over JsonHilo which emits fully parsed objects and arrays.","archived":false,"fork":false,"pushed_at":"2023-08-03T13:56:42.000Z","size":22,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-31T01:49:38.197Z","etag":null,"topics":["deno","json","jsonhilo","jsonstrum","objects","parser","sax","stream","streaming"],"latest_commit_sha":null,"homepage":"","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/xtao-org.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}},"created_at":"2022-02-04T00:31:22.000Z","updated_at":"2024-09-29T03:22:07.000Z","dependencies_parsed_at":"2022-09-06T02:40:43.106Z","dependency_job_id":null,"html_url":"https://github.com/xtao-org/jsonstrum","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtao-org%2Fjsonstrum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtao-org%2Fjsonstrum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtao-org%2Fjsonstrum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtao-org%2Fjsonstrum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtao-org","download_url":"https://codeload.github.com/xtao-org/jsonstrum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224374720,"owners_count":17300691,"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":["deno","json","jsonhilo","jsonstrum","objects","parser","sax","stream","streaming"],"created_at":"2024-11-13T02:08:29.262Z","updated_at":"2024-11-13T02:08:29.730Z","avatar_url":"https://github.com/xtao-org.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JsonStrum.js\n\nA high-level wrapper over [JsonHilo](https://github.com/xtao-org/jsonhilo) which emits fully parsed objects and arrays.\n\nShould work in any modern JavaScript runtime: Node.js, Bun, Deno, the browser.\n\n## Install\n\n### Node.js and Bun\n\nAn [npm package](https://www.npmjs.com/package/@xtao-org/jsonstrum) is available:\n\n```\nnpm i @xtao-org/jsonstrum\n```\n\n### Deno or the browser\n\nImport modules directly from a CDN such as [jsDelivr](https://www.jsdelivr.com/):\n\n```js\nimport {JsonHigh} from 'https://cdn.jsdelivr.net/gh/xtao-org/jsonstrum@v0.2.3/mod.js'\n```\n\nAlternatively in Deno you can also import the npm package:\n\n```js\nimport {JsonStrum} from 'npm:@xtao-org/jsonstrum'\n```\n\n## Quickstart\n\n```js\n// if using Deno import from 'npm:@xtao-org/jsonstrum'\nimport {JsonStrum} from '@xtao-org/jsonstrum'\n\nconst s = JsonStrum({\n  object: (object) =\u003e console.log('object', object),\n  array: (array) =\u003e console.log('array', array),\n  // will only parse and emit objects at this level of nesting \n  level: 1,\n})\n\ns.chunk(`\n[\n  {\"name\": \"Alice\", \"color\": \"red\", \"count\": 5},\n  {\"name\": \"Bob\", \"color\": \"blue\", \"count\": 4},\n]\n`)\n/* OUTPUT:\nobject { name: \"Alice\", color: \"red\", count: 5 }\nobject { name: \"Bob\", color: \"blue\", count: 4 }\n*/\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtao-org%2Fjsonstrum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtao-org%2Fjsonstrum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtao-org%2Fjsonstrum/lists"}