A simple utility which creates a json-like string representation of the non-default public properties of an object
- .NET 10.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}]}"