public JsonArray(string element) { string st = Compiler.smartExtract(element); st = st.Substring(1, st.Length - 2); elements.AddRange(Compiler.smartSplitJson(st, ',').Select(x => JsonMerger.GetObject(x))); }
public JsonObject(string element) { string[][] block = Compiler.smartSplitJson(Compiler.getCodeBlock(element), ',') .Select(x => Compiler.smartSplitJson(x, ':').Select(y => Compiler.smartExtract(y)).ToArray()) .ToArray(); foreach (string[] kv in block) { values[kv[0]] = JsonMerger.GetObject(kv[1]); } }