I'm looking for a way to render a C# class object to javascript. For instance this class definition:
public class Foo
{
public string Bar1 { get; set; }
public string Bar2 { get; set; }
}
should render (an object of class Foo with values filled) as:
foo:
{
bar1: 'bar1value',
bar2: 'bar2value'
}
I know my way around reflection, but before reinventing the wheel all over again I was wondering if there are any libraries already doing these kind of things.