using System.Collections.Generic;
public static void Main()
var json = "{ \"spec\": { \"SOMETHING WITH SPACES\" : \"10\" } }";
var someObj = JsonConvert.DeserializeObject<SomeObject>(json);
Console.WriteLine(someObj.spec["SOMETHING WITH SPACES"]);
foreach (var pair in someObj.spec as IEnumerable<KeyValuePair<string, object>>)
Console.WriteLine(pair.Key + " -> " + pair.Value);
var list = someObj.spec.ToList();
foreach (var pair in list)
Console.WriteLine(pair.Key + " -> " + pair.Value);
public Dictionary<string, object> spec{ get; set; }