using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
public static void Test()
Test(@"{""data"" : { ""vectorOne[1]"" : { ""value"" : 1 }}}", "data['vectorOne[1]'].value");
Test(@"{""single-quote-'"" : ""value""}", @"['single-quote-\'']");
public static void Test(string json, string path)
var root = JObject.Parse(json);
Console.WriteLine("\nIncoming JSON:");
var value = root.SelectToken(path);
Console.WriteLine("Value of {0} = {1}", path, value);
Console.WriteLine("All Paths:");
foreach (var item in root.DescendantsAndSelf())
Console.WriteLine(item.Path);
public static void Main()
Console.WriteLine("Environment version: {0} ({1})", System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription , Environment.Version);
Console.WriteLine("{0} version: {1}", typeof(JsonSerializer).Assembly.GetName().Name, typeof(JsonSerializer).Assembly.FullName);
Console.WriteLine("Failed with unhandled exception: ");