{"id":16950326,"url":"https://github.com/mischnic/json-sourcemap","last_synced_at":"2025-10-30T01:44:37.207Z","repository":{"id":57683079,"uuid":"480066446","full_name":"mischnic/json-sourcemap","owner":"mischnic","description":"Generate positions for values in JSON and JSON5 strings","archived":false,"fork":false,"pushed_at":"2023-09-20T14:11:17.000Z","size":935,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-17T11:16:51.385Z","etag":null,"topics":["json","json5"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@mischnic/json-sourcemap","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/mischnic.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":"2022-04-10T15:57:33.000Z","updated_at":"2025-08-06T08:41:24.000Z","dependencies_parsed_at":"2024-06-19T02:07:05.242Z","dependency_job_id":null,"html_url":"https://github.com/mischnic/json-sourcemap","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"412fa25ac32e4e66d420d7e2e0b2599da5d2f21f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mischnic/json-sourcemap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischnic%2Fjson-sourcemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischnic%2Fjson-sourcemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischnic%2Fjson-sourcemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischnic%2Fjson-sourcemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mischnic","download_url":"https://codeload.github.com/mischnic/json-sourcemap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischnic%2Fjson-sourcemap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271760499,"owners_count":24816431,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["json","json5"],"created_at":"2024-10-13T21:57:21.797Z","updated_at":"2025-10-30T01:44:32.159Z","avatar_url":"https://github.com/mischnic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @mischnic/json-sourcemap\n\nGenerate positions for values in JSON and JSON5 strings.\n\nInspired by and mostly API-compatible with https://github.com/epoberezkin/json-source-map.\n\n## Usage\n\n```ts\ntype Position = {\n  line: number;\n  column: number;\n  pos: number;\n};\n\ntype Mapping =\n  | {\n      value: Position;\n      valueEnd: Position;\n    }\n  | {\n      value: Position;\n      valueEnd: Position;\n      key?: Position;\n      keyEnd?: Position;\n    };\n\nexport function parse(\n  json: string,\n  reviver?: (key: any, value: any) =\u003e any,\n  options?: {\n    tabWidth?: number;\n    dialect?: \"JSON5\" | \"JSON\";\n  }\n): {\n  data: any;\n  pointers: Record\u003cstring, Mapping\u003e;\n};\n```\n\nThe default `tabWidth` is 4.\n\nThe `valueEnd` and `keyEnd` positions are exclusive. `line`, `column` and `pos` are 0-based.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmischnic%2Fjson-sourcemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmischnic%2Fjson-sourcemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmischnic%2Fjson-sourcemap/lists"}