{"id":13679098,"url":"https://github.com/thomasgalliker/ObjectDumper","last_synced_at":"2025-04-29T16:30:57.778Z","repository":{"id":21710905,"uuid":"93836971","full_name":"thomasgalliker/ObjectDumper","owner":"thomasgalliker","description":"ObjectDumper is a utility which aims to serialize C# objects to string for debugging and logging purposes.","archived":false,"fork":false,"pushed_at":"2025-04-13T10:34:17.000Z","size":9322,"stargazers_count":411,"open_issues_count":13,"forks_count":39,"subscribers_count":11,"default_branch":"develop","last_synced_at":"2025-04-25T18:28:16.978Z","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/thomasgalliker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"patreon":"user?u=21232884"}},"created_at":"2017-06-09T08:29:58.000Z","updated_at":"2025-04-15T23:28:13.000Z","dependencies_parsed_at":"2024-06-21T02:13:19.643Z","dependency_job_id":"9b67c1f8-9c4d-4f04-8e42-c2089ce6951c","html_url":"https://github.com/thomasgalliker/ObjectDumper","commit_stats":{"total_commits":251,"total_committers":11,"mean_commits":"22.818181818181817","dds":"0.10358565737051795","last_synced_commit":"6aab737cacebe21c07d87e6bbfb92503d7014532"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasgalliker%2FObjectDumper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasgalliker%2FObjectDumper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasgalliker%2FObjectDumper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasgalliker%2FObjectDumper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasgalliker","download_url":"https://codeload.github.com/thomasgalliker/ObjectDumper/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251540072,"owners_count":21605840,"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-08-02T13:01:01.948Z","updated_at":"2025-04-29T16:30:52.765Z","avatar_url":"https://github.com/thomasgalliker.png","language":"C#","readme":"# ObjectDumper.NET\n[![Version](https://img.shields.io/nuget/v/ObjectDumper.NET.svg)](https://www.nuget.org/packages/ObjectDumper.NET)  [![Downloads](https://img.shields.io/nuget/dt/ObjectDumper.NET.svg)](https://www.nuget.org/packages/ObjectDumper.NET)\n\nObjectDumper is a utility which aims to serialize C# objects to string for debugging and logging purposes.\n\n### Download and Install ObjectDumper.NET\nThis library is available on NuGet: https://www.nuget.org/packages/ObjectDumper.NET/\nUse the following command to install ObjectDumper using NuGet package manager console:\n\n    PM\u003e Install-Package ObjectDumper.NET\n\nYou can use this library in any .NET project which is compatible to PCL (e.g. Xamarin Android, iOS, Windows Phone, Windows Store, Universal Apps, etc.)\n\n### The Purpose of ObjectDumper\nSerialization, the process of converting a complex object to a machine-readable or over-the-wire transmittable string, is a technique often used in software engineering. A well-known serializer is Newtonsoft.JSON which serializes .NET objects to the data representation format JSON.\n\nObjectDumper.NET provides two excellent ways to visualize in-memory .NET objects:\n- **DumpStyle.Console**: serialize objects to human-readable strings, often used to write complex C# objects to log files.\n- **DumpStyle.CSharp**: serialize objects to C# initializer code, which can be used to compile a C# object again.\n\n### API Usage\n#### Dumping C# Objects to Console.WriteLine\nThe following sample program uses **DumpStyle.Console** to write C# objects to the console output:\n```C#\nstatic void Main(string[] args)\n{\n    var persons = new List\u003cPerson\u003e\n    {\n        new Person { Name = \"John\", Age = 20, },\n        new Person { Name = \"Thomas\", Age = 30, },\n    };\n\n    var personsDump = ObjectDumper.Dump(persons);\n\n    Console.WriteLine(personsDump);\n    Console.ReadLine();\n}\n\n//CONSOLE OUTPUT:\n{ObjectDumperSample.Netfx.Person}\n  Name: \"John\"\n  Age: 20\n{ObjectDumperSample.Netfx.Person}\n  Name: \"Thomas\"\n  Age: 30\n```\n\n#### Dumping C# initializer code from in-memory objects to Console.WriteLine\nThe following sample program uses **DumpStyle.CSharp** to write C# initializer code from in-memory to the console output:\n```C#\nstatic void Main(string[] args)\n{\n    var persons = new List\u003cPerson\u003e\n    {\n        new Person { Name = \"John\", Age = 20, },\n        new Person { Name = \"Thomas\", Age = 30, },\n    };\n\n    var personsDump = ObjectDumper.Dump(persons, DumpStyle.CSharp);\n\n    Console.WriteLine(personsDump);\n    Console.ReadLine();\n}\n\n//CONSOLE OUTPUT:\nvar listOfPersons = new List\u003cPerson\u003e\n{\n  new Person\n  {\n    Name = \"John\",\n    Age = 20\n  },\n  new Person\n  {\n    Name = \"Thomas\",\n    Age = 30\n  }\n};\n```\n\n### Strong-named assembly\nThis assembly is signed with the key ObjectDumper.snk in this repository.\n\nPublic key (hash algorithm: sha1):\n```\n00240000048000009400000006020000002400005253413100040000010001008da06ec8c6bd242c52102a9fc293b7af32f183da0d069f7c9522f063cacc3cc584668dfd6cf0560577380822b0c46fdb19e44fc78fad5e8d15b2c24a8766e2769c942705442926b3dcce385eac263893a4b6916976324544792ba1fb4697ab0d1bf28f3c8f0512234fa0a7b732141f7dc4b4a340bdaa95a6c1460c6a699e65c3\n```\n\nPublic key token is `fcc359471136d8b8`.\n\nIn order to get these values, run following commands:\n- Extract public key of snk: `sn -p ObjectDumper.snk public.key`\n- Display public key: `sn -tp public.key`\n\n\n### Links\n- Standard numeric format strings\nhttps://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings\n- Standard date and time format strings\nhttps://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings\n- Standard timespan format strings\nhttps://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-timespan-format-strings\n- C# Record Types\nhttps://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/record\n- C# Escape / Unescape\nhttps://codebeautify.org/csharp-escape-unescape\n\n\n### License\nThis project is Copyright \u0026copy; 2023 [Thomas Galliker](https://ch.linkedin.com/in/thomasgalliker). Free for non-commercial use. For commercial use please contact the author.\n","funding_links":["https://patreon.com/user?u=21232884"],"categories":["C#","Serialization","Identifiers"],"sub_categories":["GUI - other"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasgalliker%2FObjectDumper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasgalliker%2FObjectDumper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasgalliker%2FObjectDumper/lists"}