public static object Parse(string jsonString) { using (var instance = new Parser(jsonString)) { return instance.ParseValue(); } }
/// <summary> /// Parses the string json into a value /// </summary> /// <param name="json">A JSON string.</param> /// <returns>An List<object>, a Dictionary<string, object>, a double, an integer,a string, null, true, or false</returns> public static object Deserialize(string json) { // save the string for debug information if (json == null) return null; var parser = new Parser(json); return parser.Parse(); }
public static string GetStringDecode(string encodeStr) { using (var instance = new Parser(encodeStr)) { return instance.ParseString(); } }
public static List<object> DeserializeArrayNoRecursion(string json) { if (json == null) { return null; } else if (json == "" || json == "[]") { return new List<object>(0); } Parser parser = new Parser(json); return parser.ParseArrayOnly(); }