{"id":42914125,"url":"https://github.com/dennis198/dotserial","last_synced_at":"2026-01-30T17:02:58.717Z","repository":{"id":316667593,"uuid":"1037949608","full_name":"Dennis198/DotSerial","owner":"Dennis198","description":"DotSerial is a lightweight cross-platform C# library for serializing and deserializing .NET objects.","archived":false,"fork":false,"pushed_at":"2026-01-21T16:57:58.000Z","size":583,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-22T04:38:25.633Z","etag":null,"topics":["cross-platform","deserialization","dotnet","json","serialization","xml","yaml"],"latest_commit_sha":null,"homepage":"https://github.com/Dennis198/DotSerial","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/Dennis198.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-14T11:28:06.000Z","updated_at":"2025-11-23T10:12:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"e1ccc323-9dab-417f-bba2-844a8906299e","html_url":"https://github.com/Dennis198/DotSerial","commit_stats":null,"previous_names":["dennis198/dotserial"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Dennis198/DotSerial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dennis198%2FDotSerial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dennis198%2FDotSerial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dennis198%2FDotSerial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dennis198%2FDotSerial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dennis198","download_url":"https://codeload.github.com/Dennis198/DotSerial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dennis198%2FDotSerial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28915942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T16:37:38.804Z","status":"ssl_error","status_checked_at":"2026-01-30T16:37:37.878Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["cross-platform","deserialization","dotnet","json","serialization","xml","yaml"],"created_at":"2026-01-30T17:02:56.802Z","updated_at":"2026-01-30T17:02:58.709Z","avatar_url":"https://github.com/Dennis198.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DotSerial  \n\nDotSerial is a lightweight cross-platform C# library for serializing and deserializing .NET objects.  \nIt allows developers to easily mark properties for serialization using a simple attribute, and provides functionality to save and load\nobjects from files in different data serialization formats.  \n\nIf you encounter any errors, you can create an issues at [GitHub](https://github.com/Dennis198/DotSerial/issues),\n\n## Features  \n- Simple attribute-based serialization with **`[DotSerialName]`** for custom naming\n- Ignore properties with **`[DotSerialIgnore]`**\n- Save objects to a file and load them back in different data serialization formats\n- Serialize/Deserialize .NET objects  \n- Developer-friendly and lightweight  \n\n---\n\n## Installation  \nAdd **DotSerial** to your project [nuget](https://www.nuget.org/packages/Dennis198.DotSerial).  \nOr include the source in your project.  \n\n---\n\n## Usage  \n\n### Mark properties with `DotSerialName`  \n```csharp\nusing DotSerial;\n\npublic class Example\n{\n    [DotSerialName(\"Example_Boolean\")]\n    public bool Boolean { get; set; }\n\n    [DotSerialName(\"Example_Number\")]\n    public int Number { get; set; }\n\n    [DotSerialName(\"Example_Text\")]\n    public string Text { get; set; }\n}\n```\n\n### Serialize and Deserialize  \n```csharp\nvar obj = new Example\n{\n    Boolean = true,\n    Number = 42,\n    Text = \"Hello DotSerial!\"\n};\n\n// Serialize (Json)\nvar serialized = DotSerialJson.Serialize(obj);\n//{\n//  \"Example_Boolean\": \"true\",\n//  \"Example_Number\": \"42\",\n//  \"Example_Text\": \"Hello DotSerial!\"\n//}\n\n// Deserialize back\nExample result = DotSerialJson.Deserialize\u003cExample\u003e(serialized);\n```\n\n### Save and Load from File  \n```csharp\n// Save to file\nDotSerialJson.SaveToFile(\"example.json\", obj);\n\n// Load from file\nExample resultLoad = DotSerialJson.LoadFromFile\u003cExample\u003e(\"example.json\");\n```\n\n---\n\n## Attribute Reference  \n\n- **`[DotSerialName(string name)]`**  \n  - Assign a custom **Name** to each property you want to serialize.  \n  - The name must be unique within the class.\n  - Properties without this attribute will be named after the propertie. \n- **`[DotSerialName(string name)]`**  \n  - Properties with this attribute will be ignored.\n\nExample:\n```csharp\n[DotSerialName(\"User_Name\")]\npublic string Name { get; set; }\n\n[DotSerialName(\"User_Age\")]\npublic int Age { get; set; }\n\npublic int Occupation { get; set; }\n\n[DotSerialIgnore]\npublic int Gender { get; set; }\n\n//{\n//  \"User_Name\": \"Randy\",\n//  \"User_Age\": \"42\",\n//  \"Occupation\": \"Magician\"\n//}\n```\n\n---\n\n## Notes   \n- Use DotSerialXml for Xml, DotSerialJson for Json or DotSerialYaml for yaml.\n- Properties without **`DotSerialName`** will be named as the propertie.\n- Currently only **XMml Json and Yaml format** is supported. Other formats will be added in the future. \n\n---\n\n## License  \nMIT License – free to use and modify.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennis198%2Fdotserial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdennis198%2Fdotserial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennis198%2Fdotserial/lists"}