dynamic o = new ExpandoObject();
o.Num = 1.234;
o.Str = "bar";
o.Obj = new ExpandoObject();
o.Obj.Arr = new bool[3];
JsonConvert.ExportToString((object) o).Dump();
--
You received this message because you are subscribed to the Google Groups "Jayrock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jayrock+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
It gave the correct JSON as well. Now I want to convert the underscores in object properties (whether Expando or anonymous) to to hypens when serializing to JSON so that it looks like:
{"username":"jford","attr-a":"00sss0","attr-b":"test_role"}