Example #1
0
 public static object ParseValue(string jsonString)
 {
     using (var instance = new JsonParser(jsonString)) {
         return instance.ParseValue();
     }
 }
Example #2
0
        public static void ParseString1()
        {
            string str = JsonParser.ParseValue("\"test\"") as string;

            Assert.AreEqual("test", str);
        }
Example #3
0
        public static void ParseString2()
        {
            string str = JsonParser.ParseValue(" \" \\\"Test\\\" \" ") as string;

            Assert.AreEqual(" \"Test\" ", str);
        }
Example #4
0
        public static void ParseString4()
        {
            string str = JsonParser.ParseValue("Test\"") as string;

            Assert.IsNull(str);
        }
Example #5
0
        public static void ParseUTF8String1()
        {
            string str = JsonParser.ParseValue("\"\\u20AC \\u00F6 \\u00DC \\u00E9\"") as string;

            Assert.AreEqual("€ ö Ü é", str);
        }