Skip to content

DvoraShechter1/Html-Serializer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Html-Serializer

🔧 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.


✨ Features

  • Serialize objects to HTML.
  • Supports basic property types.
  • Supports lists and collections (IEnumerable).
  • Clean and extensible codebase.
  • No external dependencies (pure C#).

📦 Installation

Add this library as a Class Library in your project,
or import the source files directly from this repository.


🚀 Basic Usage

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>

🧪 Tests

The project includes examples and unit tests that ensure the serialization works as expected.


📌 Notes

  • The library is intended for serialization only (no deserialization support).
  • Code is minimal and can be extended or customized to fit your needs.

🤝 Contributing

Feel free to open Issues or Pull Requests for improvements.


📜 License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages