示例#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]);
 }