The json.txt is an example JSON object used for testing in this assembly
complex-json.txt is an example generated by this library in an commercial application.
Both JSON example objects validates with jslint, http://www.crockford.com/javascript/jslint.html

TODO!
Add NAnt build script with ndoc and nunit targets.

History.
1. Downloaded the java src files and made a JBuilder project for testing and project familiarization.
2. Simple port to .NET J#.by. renaming *.java files to *.jsl and adding them to a J# project
3. Added J# frontend and a C# frontend for testing library in the same solution
	This J# project can be provided upon request.

4. Created a new project and ported all *.jsl files manually to C#.
5. Added C# language features such as indexers, and properties
6. Converted JavaDoc comments to /// comments.
7. Added a simple facade.
8. Added a test driver console app.

Thanks to Douglas Crockford for publishig his Java source code.


Possible refinements.
Full integration with .NET similar to XmlSerializer

using System.Xml;
using System.Xml.Serialization;

      PurchaseOrder po = new PurchaseOrder();
      po.AddItem(new Item("123", "pencil",     0.15, 100));
      po.AddItem(new Item("321", "copy paper", 7.50,  25));
      po.AddItem(new Item("111", "white out",  1.35,  10));

      po.DisplayItems();

      //Serialize the Current Purchase Order
      XmlSerializer xser = new XmlSerializer(typeof(PurchaseOrder));

      //-----------------------------------------------------------------------
      using (TextWriter tw = new StreamWriter("po.xml"))
      {
        xser.Serialize(tw, po);
      }
      System.Console.WriteLine("Serialization to po.xml completed\n\n");

// ------------- JSON version -------------------------------------------------
// i.e.
using org.Json;
using org.Json.Serialization;

			JsonSerializer jser = new JsonSerializer(typeof(PurchaseOrder));

      //-----------------------------------------------------------------------
      using (TextWriter tw = new StreamWriter("po.json"))
      {
        jser.Serialize(tw, po);
      }

      System.Console.WriteLine("Serialization to po.json completed\n\n");

      //-----------------------------------------------------------------------
			//Serialize to a StringBuilder buffer !!!
			System.Console.WriteLine("Serialize to StringBuilder object and echo content\n\n");

			StringBuilder sb = new StringBuilder();
			using (StringWriter sw = new StringWriter(sb))
			{
				jser.Serialize(sw,po);
			}
      System.Console.WriteLine(sb);


Result (slightly modified for readability;-)
[
{"sku":123, "desc":"pencil",     "price":0.15, "quantity":100},
{"sku":321, "desc":"copy paper", "price":7.50, "quantity":25},
{"sku":213, "desc":"white out",  "price":1.35, "quantity":10}
];
