ln.json/json.test/Program.cs

44 lines
864 B
C#

using System;
using System.IO;
using sharp.json;
using sharp.parser;
namespace json.test
{
class MainClass
{
static string[] sources = {
"\"I am a string\"",
"{ \"me\" : \"is a string too\"}",
"[ \"this\", \"is\", \"an\", \"array\" ]"
};
public static void Main(string[] args)
{
JSON json;
JSONParser jsonparser = new JSONParser();
json = jsonparser.Parse("4.9125E-05");
Console.WriteLine(json.ToString());
//Console.WriteLine("JSON test Patterns:");
//Console.WriteLine();
//foreach (string src in sources){
// json = jsonparser.Parse(src);
// Console.WriteLine("NEW PARSER: {0}",json.ToString());
//}
//json = jsonparser.Parse(File.ReadAllText("test.json"));
//Console.WriteLine("");
//Console.WriteLine("test.json file:");
//Console.WriteLine("PARSED: {0}",json.ToString());
}
}
}