Пример #1
0
        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)));
        }
Пример #2
0
 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]);
     }
 }