{"id":18278790,"url":"https://github.com/dbnetlink/typeddatatableconverter","last_synced_at":"2025-04-09T04:42:31.341Z","repository":{"id":211069641,"uuid":"728112562","full_name":"dbnetlink/TypedDataTableConverter","owner":"dbnetlink","description":"A version of a JSON.NET DataTable converted that allows you to specify the data types of columns if known","archived":false,"fork":false,"pushed_at":"2023-12-06T09:32:46.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T23:16:56.034Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbnetlink.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,"governance":null}},"created_at":"2023-12-06T08:57:03.000Z","updated_at":"2023-12-06T09:29:50.000Z","dependencies_parsed_at":"2023-12-06T11:09:49.429Z","dependency_job_id":null,"html_url":"https://github.com/dbnetlink/TypedDataTableConverter","commit_stats":null,"previous_names":["dbnetlink/typeddatatableconverter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbnetlink%2FTypedDataTableConverter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbnetlink%2FTypedDataTableConverter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbnetlink%2FTypedDataTableConverter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbnetlink%2FTypedDataTableConverter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbnetlink","download_url":"https://codeload.github.com/dbnetlink/TypedDataTableConverter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980822,"owners_count":21027803,"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-05T12:26:14.104Z","updated_at":"2025-04-09T04:42:31.320Z","avatar_url":"https://github.com/dbnetlink.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TypedDataTableConverter\nA version of the JSON.NET DataTable converter that allows you to specify the data types of columns if known.\n\nThe default datatable converter will sometimes not accurately identify the type of column if the JSON being parsed has either a missing or ambiguously formatted value in the first row.\n\nIf you know the types of the values in the JSON file up front to the converter which will use these values rather than tying to infer them from the data. You can supply this information to the converted either as a dictionary of types keyed on the property names or as the type of the object the JSON represents. The converter will fall back to it's default mechanism for identifying a type if it cannot find a column type in the supplied values.\n\n```\nvar typedConverter = new TypedDataTableConverter(typeof(Employee));\nDataTable dataTable = JsonConvert.DeserializeObject\u003cDataTable\u003e(json, typedConverter);\n```\nor\n``` \nvar employeeDataTypes = new Dictionary\u003cstring, Type\u003e();\nemployeeDataTypes[\"HireDate\"] = typeof(DateTime);\nemployeeDataTypes[\"StartDate\"] = typeof(DateTime);\nemployeeDataTypes[\"Active\"] = typeof(bool);\nemployeeDataTypes[\"Salary\"] = typeof(decimal);\nvar typedConverter = new TypedDataTableConverter(employeeDataTypes);\nDataTable dataTable = JsonConvert.DeserializeObject\u003cDataTable\u003e(json, typedConverter);\n```\n\nThe converter code is a direct copy of the Newtonsoft [repository code](https://github.com/JamesNK/Newtonsoft.Json/blob/master/Src/Newtonsoft.Json/Converters/DataTableConverter.cs) with a few small changes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbnetlink%2Ftypeddatatableconverter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbnetlink%2Ftypeddatatableconverter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbnetlink%2Ftypeddatatableconverter/lists"}