コード例 #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]);
 }