Serialize C# dynamic object to JSON object to be consumed by javascript
- by Jeff Jin
Based on the example c# dynamic with XML, I modified DynamicXml.cs and parsed my xml string.
the modified part is as follows
public override bool TryGetMember(GetMemberBinder binder, out object result)
{
result = null;
if (binder.Name == "Controls")
result = new DynamicXml(_elements.Elements());
else if…