using System.Collections.Generic;
using System.Text.RegularExpressions;
"\"stringProp\":\"this is a string, with a comma\","+
"\"objectProp\":{\"howdy\":\"there\"},"+
public static void Main()
var regex = new Regex("[{,][\\s\\n]*\"([\\w\\s]+)\"\\s*:\\s*(?:\"([^\"]*)|({[^}]*})|([^,\\n}]*))");
var dict = new Dictionary<string, string>();
foreach (Match result in regex.Matches(example))
dict.Add(result.Groups[1].Value, $"{result.Groups[2].Value}{result.Groups[3].Value}{result.Groups[4].Value}");
Console.WriteLine($"stringProp: {GetString("stringProp")}");
Console.WriteLine($"objectProp: {GetObject<string>("objectProp")}");
Console.WriteLine($"boolProp: {GetBool("boolProp")}");
Console.WriteLine($"intProp: {GetInt("intProp")}");
Console.WriteLine($"floatProp: {GetFloat("floatProp")}");
string GetString(string key) => dict[key];
bool GetBool(string key) => dict[key] == "true";
int GetInt(string key) => int.Parse(dict[key]);
float GetFloat(string key) => float.Parse(dict[key]);
string GetObject<T>(string key) { return dict[key];}