using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
public static void Test()
string content = GetJson();
var jo = JObject.Parse(content);
var jsonPath = "$..Data[*]";
var result = jo.SelectTokens(jsonPath, true )
.Select(o => o.ToObject<Dictionary<string, object>>())
Console.WriteLine("\nRe-serialized {0}:", result);
Console.WriteLine(JsonConvert.SerializeObject(result, Formatting.Indented));
""Name"": ""Customer Name"",
""Email"": ""test@hfgidfgd.com""
""Name"": ""Customer Name"",
""Email"": ""test@hfgidfgd.com""
""Name"": ""Customer Name"",
""Email"": ""test@hfgidfgd.com""
public static void Main()
Console.WriteLine("Environment version: " + Environment.Version);
Console.WriteLine("Json.NET version: " + typeof(JsonSerializer).Assembly.FullName);
Console.WriteLine("Failed with unhandled exception: ");
public class AssertionFailedException : System.Exception
public AssertionFailedException() : base() { }
public AssertionFailedException(string s) : base(s) { }
public static class Assert
public static void IsTrue(bool value)
public static void IsTrue(bool value, string message)
throw new AssertionFailedException(message ?? "failed");