Skip to content

Latest commit

 

History

History
22 lines (21 loc) · 1.19 KB

README.md

File metadata and controls

22 lines (21 loc) · 1.19 KB

Stringification   Build status NuGet NuGet License

A simple utility which creates a json-like string representation of the non-default public propertiues of an object

  • .NET 8.0 library
  • simple and intuitive API
  • tested
  • dependencies: none
Company company = new()
{
    Name = "Aco",
    Id = 9,
    Active = true,
    Location = new Location("3 Ruey", Country.Macedonia, DateTime.Now),
    People = new List<Person>() 
            { new Person("Natalia", 18), new Person("Natasha", 42) }
};
company.Stringify() =>
    "Company: {Name:'Aco', Id:9, Active:True, Location:{Address:'3 Ruey', Country:Macedonia, Updated:4/7/2019 10:10:20 PM}, People:[{Name:'Natalia', Age:18}, {Name:'Natasha', Age:42}]}"