{"id":20790545,"url":"https://github.com/chsword/jdynamic","last_synced_at":"2026-04-21T12:03:48.508Z","repository":{"id":19633098,"uuid":"22885112","full_name":"chsword/jdynamic","owner":"chsword","description":"json dynamic .NET","archived":false,"fork":false,"pushed_at":"2015-01-12T05:06:58.000Z","size":171,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-18T10:32:25.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.cnblogs.com/chsword/archive/2012/10/09/jdynamic_testcase.html","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chsword.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-12T16:54:58.000Z","updated_at":"2016-10-21T14:49:07.000Z","dependencies_parsed_at":"2022-08-24T14:01:59.707Z","dependency_job_id":null,"html_url":"https://github.com/chsword/jdynamic","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/chsword%2Fjdynamic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chsword%2Fjdynamic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chsword%2Fjdynamic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chsword%2Fjdynamic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chsword","download_url":"https://codeload.github.com/chsword/jdynamic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243136242,"owners_count":20241988,"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":[],"created_at":"2024-11-17T15:35:44.951Z","updated_at":"2025-12-24T12:09:33.155Z","avatar_url":"https://github.com/chsword.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JDynamic \nA tools transfer json to .NET Dynamic Object\n\n[![install from nuget](http://img.shields.io/nuget/v/jDynamic.svg?style=flat-square)](https://www.nuget.org/packages/jDynamic)[![downloads](http://img.shields.io/nuget/dt/jDynamic.svg?style=flat-square)](https://www.nuget.org/packages/jDynamic)\n\n\n@chsword on Weibo.com\nlinkedin\n\n### NuGet Install\n``` powershell\nPM\u003e Install-Package JDynamic\n```\n\n### Planning\nv1.2.0.1\n\nNegative value can't used.\n\n### Released\nV1.2.0.0 Futures\nFix DateTime bug.\nV1.1.0.0 Futures\n\nSupport using string index to access member like:\n``` csharp\ndynamic json = new JDynamic(\"{a:{a:1}}\");\nAssert.AreEqual(1, json[\"a\"][\"a\"]);\n```\n### Test Case\n\nEn, you can use this util as following :\n\n1. Get the value directly\n``` csharp\ndynamic json = new JDynamic(\"1\");\n\n//json.Value\n```\n2.Get the member in the json object\n``` csharp\ndynamic json = new JDynamic(\"{a:'abc'}\");\n//json.a is a string \"abc\"\n\ndynamic json = new JDynamic(\"{a:3.1416}\");\n//json.a is 3.1416m\n\ndynamic json = new JDynamic(\"{a:1}\");\n//json.a is integer: 1\n```\n3.IEnemerable\n``` csharp\ndynamic json = new JDynamic(\"[1,2,3]\");\n/json.Length/json.Count is 3\n//And you can use json[0]/ json[2] to get the elements\n\ndynamic json = new JDynamic(\"{a:[1,2,3]}\");\n//json.a.Length /json.a.Count is 3.\n//And you can use  json.a[0]/ json.a[2] to get the elements\n\ndynamic json = new JDynamic(\"[{b:1},{c:1}]\");\n//json.Length/json.Count is 2.\n//And you can use the  json[0].b/json[1].c to get the num.\n```\n4. Other\n``` csharp\ndynamic json = new JDynamic(\"{a:{a:1} }\");\n//json.a.a is 1.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchsword%2Fjdynamic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchsword%2Fjdynamic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchsword%2Fjdynamic/lists"}