// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Collections.Generic; using System.IO; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace E { public class Program { public static void Main(string[] args) { JArray all = (JArray)JsonConvert.DeserializeObject(File.ReadAllText(@"\work\e2.json")); foreach(JObject one in all) { Console.WriteLine("**** start big object ****"); Console.WriteLine("NativeClass = {0}", one.Value("NativeClass")); foreach(JObject o in one.Value("Classes")) { foreach(KeyValuePair f in o) { Console.WriteLine("field name = {0}, field value = {1}", f.Key, (string)f.Value); } } } } } }