{"id":28835730,"url":"https://github.com/odonno/converto","last_synced_at":"2025-07-21T16:07:51.186Z","repository":{"id":34017696,"uuid":"159170524","full_name":"Odonno/Converto","owner":"Odonno","description":"A C# library which gives you basic functions for type conversion and object transformation","archived":false,"fork":false,"pushed_at":"2022-10-04T11:49:35.000Z","size":42,"stargazers_count":7,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-20T10:12:34.269Z","etag":null,"topics":["convert","copy","csharp","dotnet","functional","todictionary","toobject","with"],"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/Odonno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-26T13:02:15.000Z","updated_at":"2025-05-22T15:48:47.000Z","dependencies_parsed_at":"2023-01-15T03:59:16.876Z","dependency_job_id":null,"html_url":"https://github.com/Odonno/Converto","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Odonno/Converto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odonno%2FConverto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odonno%2FConverto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odonno%2FConverto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odonno%2FConverto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Odonno","download_url":"https://codeload.github.com/Odonno/Converto/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Odonno%2FConverto/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266332598,"owners_count":23912663,"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-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["convert","copy","csharp","dotnet","functional","todictionary","toobject","with"],"created_at":"2025-06-19T10:10:45.421Z","updated_at":"2025-07-21T16:07:51.177Z","avatar_url":"https://github.com/Odonno.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Converto\n\n[![CodeFactor](https://www.codefactor.io/repository/github/odonno/converto/badge)](https://www.codefactor.io/repository/github/odonno/converto)\n\n| Package           | NuGet                                                                                                         |\n|-------------------|---------------------------------------------------------------------------------------------------------------|\n| Converto          | [![NuGet](https://img.shields.io/nuget/v/Converto.svg)](https://www.nuget.org/packages/Converto/)                 |\n| Converto.SuccincT | [![NuGet](https://img.shields.io/nuget/v/Converto.SuccincT.svg)](https://www.nuget.org/packages/Converto.SuccincT/) |\n\nConverto is a C# library which gives you basic functions for type conversion and object transformation.\n\n## Functions\n\n\u003cdetails\u003e\n\u003csummary\u003eCopy\u003c/summary\u003e\n\u003cbr\u003e\n\nThe `Copy` function allows you to strictly copy an object.\n\n```csharp\nvar newObject = existingObject.Copy();\n```\n\n```csharp\nif (existingObject.TryCopy(out newObject))\n{\n}\n```\n\n#### Using SuccincT library\n\n```csharp\nvar newObjectOption = existingObject.TryCopy();\nvar newObject = newObjectOption.Value;\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWith\u003c/summary\u003e\n\u003cbr\u003e\n\nThe `With` function allows you to create a new object by mutating some properties.\n\n```csharp\nvar newObject = existingObject.With(new { Name = \"Hello\" });\n```\n\n```csharp\nif (existingObject.TryWith(new { Name = \"Hello\" }, out newObject))\n{\n}\n```\n\n#### Using SuccincT library\n\n```csharp\nvar newObjectOption = existingObject.TryWith(new { Name = \"Hello\" });\nvar newObject = newObjectOption.Value;\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eConvertTo\u003c/summary\u003e\n\u003cbr\u003e\n\nThe `ConvertTo` function allows you to create an object of a different type using the matching properties of another object.\n\n```csharp\nvar newObject = objectOfTypeA.ConvertTo\u003cTypeB\u003e();\n```\n\n```csharp\nif (objectOfTypeA.TryConvertTo\u003cTypeB\u003e(out newObject))\n{\n}\n```\n\n#### Using SuccincT library\n\n```csharp\nvar newObjectOption = objectOfTypeA.TryConvertTo\u003cTypeB\u003e();\nvar newObject = newObjectOption.Value;\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eIsDeepEqual\u003c/summary\u003e\n\u003cbr\u003e\n\nThe `IsDeepEqual` function detects if two objects have strictly the same properties (not necessarily the same object).\n\n```csharp\nbool isDeepEqual = object1.IsDeepEqual(object2);\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eToDictionary\u003c/summary\u003e\n\u003cbr\u003e\n\nThe `ToDictionary` function allows you to create a dictionary from an object.\n\n```csharp\nvar newDictionary = existingObject.ToDictionary();\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eToObject\u003c/summary\u003e\n\u003cbr\u003e\n\nThe `ToObject` function allows you to create an object from a dictionary.\n\n```csharp\nvar newObjectOfTypeA = existingDictionary.ToObject\u003cTypeA\u003e();\n```\n\n#### Using SuccincT library\n\n```csharp\nvar newObjectOption = existingDictionary.TryToObject\u003cTypeA\u003e();\nvar newObject = newObjectOption.Value;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodonno%2Fconverto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodonno%2Fconverto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodonno%2Fconverto/lists"}