static void Sample8() { using (var jr = new ChoJSONReader <DataMapper>("sample8.json")) { foreach (var x in jr) { Console.WriteLine(ChoUtility.DumpAsJson(x)); } } }
static void Sample11Test() { using (var parser = new ChoXmlReader("sample11.xml").WithXPath("/members/father") .WithField("id") .WithField("sons") ) { foreach (dynamic rec in parser) { Console.WriteLine(ChoUtility.DumpAsJson(rec.sons)); } } }
static void Sample12() { using (var jr = new ChoJSONReader("sample12.json") ) { foreach (var x1 in jr) { foreach (var z1 in x1) { dynamic newObj = new ChoDynamicObject(); newObj.name = z1.Key; foreach (var kvp in (ChoDynamicObject)z1.Value) { ((ChoDynamicObject)newObj).AddOrUpdate(kvp.Key, kvp.Value); } Console.WriteLine(ChoUtility.DumpAsJson(newObj)); } } } }
public string DumpAsJson() { return(ChoUtility.DumpAsJson(this)); }