{"id":16554577,"url":"https://github.com/tyrrrz/quickjson","last_synced_at":"2025-10-04T00:31:35.991Z","repository":{"id":111086343,"uuid":"380350093","full_name":"Tyrrrz/QuickJson","owner":"Tyrrrz","description":"Simple JSON parser in a source-only package","archived":false,"fork":false,"pushed_at":"2025-10-02T12:58:56.000Z","size":98,"stargazers_count":15,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-03T23:53:24.301Z","etag":null,"topics":["dotnet","dotnet-core","dotnet-standard","json","parser","recursive-descent-parser","source-only"],"latest_commit_sha":null,"homepage":"","language":"C#","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/Tyrrrz.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","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,"zenodo":null},"funding":{"github":"Tyrrrz","patreon":"Tyrrrz","custom":["tyrrrz.me/donate"]}},"created_at":"2021-06-25T20:44:31.000Z","updated_at":"2025-10-02T12:58:58.000Z","dependencies_parsed_at":"2023-04-20T19:32:13.468Z","dependency_job_id":"3d38974c-bea2-4fdd-9aaf-ff69a9bf5ace","html_url":"https://github.com/Tyrrrz/QuickJson","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Tyrrrz/QuickJson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tyrrrz%2FQuickJson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tyrrrz%2FQuickJson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tyrrrz%2FQuickJson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tyrrrz%2FQuickJson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tyrrrz","download_url":"https://codeload.github.com/Tyrrrz/QuickJson/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tyrrrz%2FQuickJson/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278249326,"owners_count":25955834,"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-10-03T02:00:06.070Z","response_time":53,"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":["dotnet","dotnet-core","dotnet-standard","json","parser","recursive-descent-parser","source-only"],"created_at":"2024-10-11T19:51:49.563Z","updated_at":"2025-10-04T00:31:35.724Z","avatar_url":"https://github.com/Tyrrrz.png","language":"C#","funding_links":["https://github.com/sponsors/Tyrrrz","https://patreon.com/Tyrrrz","tyrrrz.me/donate"],"categories":[],"sub_categories":[],"readme":"# QuickJson\n\n[![Status](https://img.shields.io/badge/status-maintenance-ffd700.svg)](https://github.com/Tyrrrz/.github/blob/master/docs/project-status.md)\n[![Made in Ukraine](https://img.shields.io/badge/made_in-ukraine-ffd700.svg?labelColor=0057b7)](https://tyrrrz.me/ukraine)\n[![Build](https://img.shields.io/github/actions/workflow/status/Tyrrrz/QuickJson/main.yml?branch=master)](https://github.com/Tyrrrz/QuickJson/actions)\n[![Coverage](https://img.shields.io/codecov/c/github/Tyrrrz/QuickJson/master)](https://codecov.io/gh/Tyrrrz/QuickJson)\n[![Version](https://img.shields.io/nuget/v/QuickJson.svg)](https://nuget.org/packages/QuickJson)\n[![Downloads](https://img.shields.io/nuget/dt/QuickJson.svg)](https://nuget.org/packages/QuickJson)\n[![Discord](https://img.shields.io/discord/869237470565392384?label=discord)](https://discord.gg/2SUWKFnHSm)\n[![Fuck Russia](https://img.shields.io/badge/fuck-russia-e4181c.svg?labelColor=000000)](https://twitter.com/tyrrrz/status/1495972128977571848)\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd width=\"99999\" align=\"center\"\u003eDevelopment of this project is entirely funded by the community. \u003cb\u003e\u003ca href=\"https://tyrrrz.me/donate\"\u003eConsider donating to support!\u003c/a\u003e\u003c/b\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n**QuickJson** is a very basic JSON parser, distributed as a source-only package that can be referenced without imposing any run-time dependencies.\n\n## Terms of use\u003csup\u003e[[?]](https://github.com/Tyrrrz/.github/blob/master/docs/why-so-political.md)\u003c/sup\u003e\n\nBy using this project or its source code, for any purpose and in any shape or form, you grant your **implicit agreement** to all the following statements:\n\n- You **condemn Russia and its military aggression against Ukraine**\n- You **recognize that Russia is an occupant that unlawfully invaded a sovereign state**\n- You **support Ukraine's territorial integrity, including its claims over temporarily occupied territories of Crimea and Donbas**\n- You **reject false narratives perpetuated by Russian state propaganda**\n\nTo learn more about the war and how you can help, [click here](https://tyrrrz.me/ukraine). Glory to Ukraine! 🇺🇦\n\n## Install\n\n- 📦 [NuGet](https://nuget.org/packages/QuickJson): `dotnet add package QuickJson`\n\n\u003e **Warning**:\n\u003e To use this package, your project needs to target C# 10 or later.\n\u003e You can ensure this by setting `\u003cLangVersion\u003elatest\u003c/LangVersion\u003e` in the project file.\n\n## Usage\n\nTo parse a JSON string, call `Json.TryParse(...)` or `Json.Parse(...)`:\n\n```csharp\n// This returns null on invalid JSON\nvar json = Json.TryParse(\n    \"\"\"\n    {\n        \"foo\": [\n            69,\n            true,\n            \"bar\"\n        ]\n    }\n    \"\"\"\n);\n\n// This throws on invalid JSON\nvar json = Json.Parse(\"...\");\n```\n\nTo retrieve a nested node in the parsed JSON, use `[Try]GetChild(...)`:\n\n```csharp\n// May return null if the property doesn't exist\n// or if the referenced node is not an object\nvar foo = json.TryGetChild(\"foo\");\n\n// May return null if the child doesn't exist\n// or if the referenced node is not an array\nvar child1 = foo?.TryGetChild(0);\nvar child2 = foo?.TryGetChild(1);\nvar child3 = foo?.TryGetChild(2);\n```\n\nAlternatively, you can also enumerate all object properties using `EnumerateProperties()` or all array children using `EnumerateChildren()`:\n\n```csharp\n// Returns an empty enumerator if the referenced node is not an object\nforeach (var prop in json.EnumerateProperties())\n{\n    var name = prop.Name; // string\n    var value = prop.Value; // JsonNode\n\n    // ...\n}\n\n// Returns an empty enumerator if the referenced node is not an array\nforeach (var child in json.EnumerateChildren())\n{\n    // ...\n}\n```\n\nIn order to extract values from nodes, use `[Try]GetNumber()`, `[Try]GetBool()`, or `[Try]GetString()`:\n\n```csharp\n// May return null if the node contains a value of a different kind\nvar value1 = child1?.TryGetNumber(); // double\nvar value2 = child2?.TryGetBool(); // bool\nvar value3 = child3?.TryGetString(); // string\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyrrrz%2Fquickjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyrrrz%2Fquickjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyrrrz%2Fquickjson/lists"}