Пример #1
0
        static public object ParseBySingleThread(string s)
        {
            ComplexTree <object> mt = JSONParser.CalculateComplexity(s);

            JSONParseThread.s = s;
            JSONNode n = JSONParseThread.Parse(mt[0]);

            return(n);
        }
Пример #2
0
        public void TestBigStringSingleThread()
        {
            Stopwatch s = Stopwatch.StartNew();

            JSONParseThread.Initialize();
            ComplexTree <object> mt = JSONParser.CalculateComplexity(longlongstring);

            JSONParseThread.s = longlongstring;
            JSONNode n = JSONParseThread.Parse(mt[0]);

            s.Stop();
            Console.WriteLine(s.Elapsed);
            Console.WriteLine(n[0][0].value);
        }
Пример #3
0
 public void ParseTest3()
 {
     string jsonstring      = "[1,\"t\",true]";
     ComplexTree <object> t = JSONParser.CalculateComplexity(jsonstring);
     JSONNode             n = JSONParseThread.Parse(t[0]);
 }
Пример #4
0
 public void ParseTest2()
 {
     string jsonstring      = "{\"test\":12345}";
     ComplexTree <object> t = JSONParser.CalculateComplexity(jsonstring);
     JSONNode             n = JSONParseThread.Parse(t[0]);
 }