{"id":34924516,"url":"https://github.com/djurm/jackson","last_synced_at":"2025-12-26T14:18:12.883Z","repository":{"id":258046468,"uuid":"873303467","full_name":"djurm/jackson","owner":"djurm","description":"Advanced type discrimination for .NET’s System.Text.Json.","archived":true,"fork":false,"pushed_at":"2025-12-05T17:58:33.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-26T13:56:38.504Z","etag":null,"topics":["csharp","discriminator","dotnet","fsharp","json","parser","systemtextjson"],"latest_commit_sha":null,"homepage":"","language":"F#","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/djurm.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-16T00:05:01.000Z","updated_at":"2025-12-25T13:09:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"10ff593f-e628-42ae-a62d-ad6cb60cec8d","html_url":"https://github.com/djurm/jackson","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"0ef361dbd30c26d4277c78253fd6890bce0cb9cc"},"previous_names":["milandjurdjevic/jackson"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/djurm/jackson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djurm%2Fjackson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djurm%2Fjackson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djurm%2Fjackson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djurm%2Fjackson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djurm","download_url":"https://codeload.github.com/djurm/jackson/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djurm%2Fjackson/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28055968,"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-12-26T02:00:06.189Z","response_time":55,"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":["csharp","discriminator","dotnet","fsharp","json","parser","systemtextjson"],"created_at":"2025-12-26T14:18:11.664Z","updated_at":"2025-12-26T14:18:12.874Z","avatar_url":"https://github.com/djurm.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jackson\n\nA .NET library for JSON parsing built on top of System.Text.Json, offering advanced type discrimination.\n\n## Motivation\n\nHandling objects with complex discrimination requirements in JSON deserialization can be difficult. While\nSystem.Text.Json supports basic deserialization well, it often requires cumbersome and error-prone custom converters for\nmore complex logic.\n\nThis library simplifies the process by providing an easy solution for deserializing JSON data into objects with complex\ndiscrimination needs. By extending System.Text.Json's capabilities, it allows developers to seamlessly deserialize JSON,\neven with intricate discrimination requirements.\n\nWith this library, developers can map JSON data to their object models efficiently, without needing extensive custom\nconverter implementations. This results in a simpler and more maintainable deserialization process.\n\n## Get Started\n\nInstall package from NuGet:\n```shell\ndotnet add package Jackson\n```\n\nBuild a parser to map JSON data to .NET types:\n```csharp\nusing System;\nusing System.Text.Json;\nusing System.Text.Json.Nodes;\nusing Jackson;\n\npublic class Type1;\npublic class Type2;\n\nvar json =\n    \"\"\"\n    [\n        { \"f1\": \"type\", \"f2\": \"1\" },\n        { \"f1\": \"type\", \"f2\": \"2\" },\n        { \"f1\": \"1\", \"f2\": \"type\" },\n        { \"f1\": \"2\", \"f2\": \"type\" },\n        { \"f1\": \"dynamic\", \"f2\": [1, 2, 3], \"f3\": { \"f1\": \"type\", \"f2\": \"1\" } }\n    ]\n    \"\"\";\n\nvar parser = Parser\n    .Create(JsonSerializerOptions.Default, \"f1\", \"f2\")\n    .Map\u003cType1\u003e(\"type\", \"1\")\n    .Map\u003cType2\u003e(\"type\", \"2\")\n    .Or(\n        Parser\n            .Create(JsonSerializerOptions.Default, \"f1\", \"f2\")\n            .Map\u003cType1\u003e(\"1\", \"type\")\n            .Map\u003cType2\u003e(\"2\", \"type\")\n            .Build()\n    )\n    .Build();\n\nvar node = JsonSerializer.Deserialize\u003cJsonNode\u003e(json);\n\nif (parser.Parse(node) is IEnumerable\u003cobject\u003e seq)\n{\n    foreach (object item in seq)\n    {\n        Console.WriteLine(item);\n    }\n}\n```\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjurm%2Fjackson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjurm%2Fjackson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjurm%2Fjackson/lists"}