🔧 A lightweight C# library for serializing objects into HTML.
The goal is to generate simple and clean HTML representation for objects without relying on heavy or external solutions.
- Serialize objects to HTML.
- Supports basic property types.
- Supports lists and collections (
IEnumerable). - Clean and extensible codebase.
- No external dependencies (pure C#).
Add this library as a Class Library in your project,
or import the source files directly from this repository.
using HtmlSerializer;
public class Person
{
public string Name { get; set; }
public int Age { get; set; }
}
class Program
{
static void Main()
{
var person = new Person
{
Name = "Dvora",
Age = 25
};
string html = HtmlConvert.Serialize(person);
Console.WriteLine(html);
}
}📄 Example Output:
<div>
<div>
<span>Name:</span> Dvora
</div>
<div>
<span>Age:</span> 25
</div>
</div>The project includes examples and unit tests that ensure the serialization works as expected.
- The library is intended for serialization only (no deserialization support).
- Code is minimal and can be extended or customized to fit your needs.
Feel free to open Issues or Pull Requests for improvements.
MIT License