{"id":22031036,"url":"https://github.com/nmyvision/datadictionary","last_synced_at":"2026-04-13T17:33:28.716Z","repository":{"id":49096390,"uuid":"115743570","full_name":"NMyVision/DataDictionary","owner":"NMyVision","description":"Wrapped IDictionary\u003cstring, object\u003e used for json serializations","archived":false,"fork":false,"pushed_at":"2021-06-29T05:22:24.000Z","size":85,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-01T07:14:49.479Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NMyVision.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}},"created_at":"2017-12-29T18:04:12.000Z","updated_at":"2020-09-11T05:55:40.000Z","dependencies_parsed_at":"2022-09-01T23:23:21.303Z","dependency_job_id":null,"html_url":"https://github.com/NMyVision/DataDictionary","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/NMyVision/DataDictionary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NMyVision%2FDataDictionary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NMyVision%2FDataDictionary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NMyVision%2FDataDictionary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NMyVision%2FDataDictionary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NMyVision","download_url":"https://codeload.github.com/NMyVision/DataDictionary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NMyVision%2FDataDictionary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31762578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-30T08:13:32.192Z","updated_at":"2026-04-13T17:33:28.702Z","avatar_url":"https://github.com/NMyVision.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DataDictionary\n\nA dictionary wrapper that converts all complex values to Dictionary\u003cstring, object\u003e or IEnumerable\u003cDictionary\u003cstring, object\u003e\u003e objects.\n\n![NuGet](https://img.shields.io/nuget/v/NMyVision.DataDictionary.svg?style=flat-square\u0026logo=nuget)\n\nFurthermore object in \u003cstring, object\u003e will always be one of the following:\n  - a simple type (```string```, ```boolean```, ```int```, ```DateTime```, etc...) \n  - an array of type\n    - DataDictionary \n    - simple type\n  - DataDictionary\n\n## Example\n\n### Anonymous Object example\n\n```csharp\nvar source = new {\n    Date = DateTime.Now,\n    Target = new {\n        Name = \"PrepublishScript\",\n        BeforeTargets = \"PrepareForPublish\"\n    },\n    Exec = new[] {\n        new { Command = \"npm install\" },\n        new { Command = \"bower install\" },\n        new { Command = @\"node node_modules\\gulp\\bin\\gulp.js\" }\n    }\n};\ndd = DataDictionary.From(source);\n```\n\nGenerates:\n\n![Sample result](https://github.com/NMyVision/DataDictionary/raw/master/images/capture001.PNG)\n\n### Class example\n\n```csharp\nclass Person\n{\n    public string Name { get; set; }\n    public int Age { get; set; }\n    public IEnumerable\u003cPerson\u003e Children { get; set; }\n}\n\nvoid Main()\n{\n\n  var person = new Person()\n  {\n    Name = \"Charlotte\",\n    Age = 34,\n    Children = new [] {\n      new Person { Name = \"Jane\" , Age = 5 }\n    }\n };\n\n  var dd = DataDictionary.From(person);\n}\n```\n\nGenerates:\n\n![Sample result](https://github.com/NMyVision/DataDictionary/raw/master/images/capture002.PNG)\n\n### JSON parsing\n\n```csharp\nstring json = @\"{\n  'title': 'Person',\n  'type': 'object',\n    'properties': {\n    'firstName': {\n      'type': 'string'\n    },\n    'lastName': {\n      'type': 'string'\n    },\n    'age': {\n      'description': 'Age in years',\n      'type': 'integer',\n      'minimum': 0,\n      'foo': null\n    }\n  },\n  'required': ['firstName', 'lastName'],\n  'people': [ ]\n}\";\n\nvar dd = DataDictionary.ParseJson(json);\n```\n![Sample result](https://github.com/NMyVision/DataDictionary/raw/master/images/capture003.PNG)\n\n\n### Helper methods\n\n\n```csharp\nvar dd = DataDictionary.ParseJson(json);\ndd.Flatten();\n```\n![Sample result](https://github.com/NMyVision/DataDictionary/raw/master/images/capture004.PNG)\n\n```csharp\ndynamic d = dd.ToExpandoObject();\nd.properties.age.type; \n\n// integer\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmyvision%2Fdatadictionary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnmyvision%2Fdatadictionary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmyvision%2Fdatadictionary/lists"}