{"id":13413262,"url":"https://github.com/romshark/jscan","last_synced_at":"2025-04-21T02:32:13.992Z","repository":{"id":44782179,"uuid":"445713945","full_name":"romshark/jscan","owner":"romshark","description":"High performance JSON iterator \u0026 validator for Go","archived":false,"fork":false,"pushed_at":"2024-02-02T18:24:10.000Z","size":8676,"stargazers_count":87,"open_issues_count":8,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-07-31T20:52:04.413Z","etag":null,"topics":["go","golang","high-performance","json","validation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romshark.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-01-08T03:28:41.000Z","updated_at":"2024-06-19T17:29:00.000Z","dependencies_parsed_at":"2023-11-12T11:22:05.045Z","dependency_job_id":"86cdf8b2-8374-4ade-95f3-11c75eea9106","html_url":"https://github.com/romshark/jscan","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romshark%2Fjscan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romshark%2Fjscan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romshark%2Fjscan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romshark%2Fjscan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romshark","download_url":"https://codeload.github.com/romshark/jscan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249986104,"owners_count":21356323,"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":["go","golang","high-performance","json","validation"],"created_at":"2024-07-30T20:01:36.361Z","updated_at":"2025-04-21T02:32:10.978Z","avatar_url":"https://github.com/romshark.png","language":"Go","readme":"\u003ca href=\"https://pkg.go.dev/github.com/romshark/jscan/v2\"\u003e\n    \u003cimg src=\"https://godoc.org/github.com/romshark/jscan/v2?status.svg\" alt=\"GoDoc\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://goreportcard.com/report/github.com/romshark/jscan/v2\"\u003e\n    \u003cimg src=\"https://goreportcard.com/badge/github.com/romshark/jscan/v2\" alt=\"GoReportCard\"\u003e\n\u003c/a\u003e\n\u003ca href='https://coveralls.io/github/romshark/jscan?branch=main'\u003e\n    \u003cimg src='https://coveralls.io/repos/github/romshark/jscan/badge.svg?branch=main' alt='Coverage Status' /\u003e\n\u003c/a\u003e\n\n\n# jscan\njscan provides high-performance zero-allocation JSON iterator and validator for Go. This module doesn't provide `Marshal`/`Unmarshal` capabilities *yet*, instead it focuses on highly efficient iteration over JSON data with on-the-fly validation.\n\nAn [experimental decoder](https://github.com/romshark/jscan-experimental-decoder) with backward compatibility to [encoding/json](https://pkg.go.dev/encoding/json) is WiP 🧪 and is expected to be introduced together with jscan v3.\n\njscan is tested against https://github.com/nst/JSONTestSuite, a comprehensive test suite for [RFC 8259](https://datatracker.ietf.org/doc/html/rfc8259) compliant JSON parsers.\n\nSee [jscan-benchmark](https://github.com/romshark/jscan-benchmark) for benchmark results 🏎️ 🏁.\n\n## Example\nhttps://go.dev/play/p/moP3l9EkebF\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/romshark/jscan/v2\"\n)\n\nfunc main() {\n\tj := `{\n\t\t\"s\": \"value\",\n\t\t\"t\": true,\n\t\t\"f\": false,\n\t\t\"0\": null,\n\t\t\"n\": -9.123e3,\n\t\t\"o0\": {},\n\t\t\"a0\": [],\n\t\t\"o\": {\n\t\t\t\"k\": \"\\\"v\\\"\",\n\t\t\t\"a\": [\n\t\t\t\ttrue,\n\t\t\t\tnull,\n\t\t\t\t\"item\",\n\t\t\t\t-67.02e9,\n\t\t\t\t[\"foo\"]\n\t\t\t]\n\t\t},\n\t\t\"a3\": [\n\t\t\t0,\n\t\t\t{\n\t\t\t\t\"a3.a3\":8\n\t\t\t}\n\t\t]\n\t}`\n\n\terr := jscan.Scan(j, func(i *jscan.Iterator[string]) (err bool) {\n\t\tfmt.Printf(\"%q:\\n\", i.Pointer())\n\t\tfmt.Printf(\"├─ valueType:  %s\\n\", i.ValueType().String())\n\t\tif k := i.Key(); k != \"\" {\n\t\t\tfmt.Printf(\"├─ key:        %q\\n\", k[1:len(k)-1])\n\t\t}\n\t\tif ai := i.ArrayIndex(); ai != -1 {\n\t\t\tfmt.Printf(\"├─ arrayIndex: %d\\n\", ai)\n\t\t}\n\t\tif v := i.Value(); v != \"\" {\n\t\t\tfmt.Printf(\"├─ value:      %q\\n\", v)\n\t\t}\n\t\tfmt.Printf(\"└─ level:      %d\\n\", i.Level())\n\t\treturn false // Resume scanning\n\t})\n\n\tif err.IsErr() {\n\t\tfmt.Printf(\"ERR: %s\\n\", err)\n\t\treturn\n\t}\n}\n```\n","funding_links":[],"categories":["JSON","Relational Databases"],"sub_categories":["Search and Analytic Databases","检索及分析资料库","Advanced Console UIs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromshark%2Fjscan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromshark%2Fjscan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromshark%2Fjscan/lists"}