{"id":13741262,"url":"https://github.com/xyaman/zjson","last_synced_at":"2026-01-17T02:42:41.802Z","repository":{"id":160057948,"uuid":"439001722","full_name":"xyaman/zjson","owner":"xyaman","description":"Minimal json library with zero allocations","archived":false,"fork":false,"pushed_at":"2021-12-28T16:17:53.000Z","size":16,"stargazers_count":42,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-04T04:07:37.017Z","etag":null,"topics":["json","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/xyaman.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}},"created_at":"2021-12-16T13:36:33.000Z","updated_at":"2024-01-20T23:36:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"cfd97393-72e3-4b8e-bd42-66060349ce0c","html_url":"https://github.com/xyaman/zjson","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/xyaman%2Fzjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyaman%2Fzjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyaman%2Fzjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyaman%2Fzjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyaman","download_url":"https://codeload.github.com/xyaman/zjson/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224774723,"owners_count":17367783,"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":["json","zig"],"created_at":"2024-08-03T04:00:57.313Z","updated_at":"2026-01-17T02:42:40.698Z","avatar_url":"https://github.com/xyaman.png","language":"Zig","funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"# zjson\n\nA very tiny json library, it allows you to get a json value from a path.\nInspired by [jsonparser](https://github.com/buger/jsonparser), a Go library.\n\nThis library is useful when you dont want to parse whole JSON file, or when\nthe structure is to complex to parse to structs. It **allocates no memory**.\n\n\u003e This library is still WIP, the API might change. There can be some bugs as it's not fully tested.\n\n## API usage:\n\nHere there is a basic example.\n\n```zig\nconst input =\n    \\\\ {\n    \\\\   \"student\": [\n    \\\\     {\n    \\\\       \"id\": \"01\",\n    \\\\       \"name\": \"Tom\",\n    \\\\       \"lastname\": \"Price\"\n    \\\\     },\n    \\\\     {\n    \\\\       \"id\": \"02\",\n    \\\\       \"name\": \"Nick\",\n    \\\\       \"lastname\": \"Thameson\"\n    \\\\     }\n    \\\\   ]\n    \\\\ }\n;\n\nconst lastname = try get(input, .{ \"student\", 1, \"lastname\" });\n// Thameson\n\n\n// Iterates an array\nconst students = try get(input, .{\"student\"});\n\nvar iter = try zjson.ArrayIterator(students);\nwhile(try iter.next()) |s| {\n    const name = try get(value.bytes, .{\"name\"}); \n    std.debug.print(\"student name: {s}\\n\", .{name.bytes});\n}\n// \"student name: Tom\"\n// \"student name: Nick\"\n```\n\nFor more usage examples, you can check [ytmusic-zig](https://github.com/xyaman/ytmusic-zig).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyaman%2Fzjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyaman%2Fzjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyaman%2Fzjson/lists"}