diff --git a/Src/Doc/LINQtoJSON.html b/Src/Doc/LINQtoJSON.html
new file mode 100644
index 00000000..d6fed018
--- /dev/null
+++ b/Src/Doc/LINQtoJSON.html
@@ -0,0 +1,193 @@
+
+
+
+
+
+
+
LINQ to JSON is a programming API for working with JSON objects. The API has been designed with LINQ in mind to enable to quick querying and creation of JSON objects. LINQ to JSON sits under the Newtonsoft.Json.Linq namespace.
+
+
Creating JSON
+
There are a number of different options when it comes to creating JSON using LINQ to JSON. The first to create objects imperatively. You have total control but it is more verbose than other options.
+
+
+
+
+
JArray array = new JArray();
+
JValue text = new JValue("Manual text");
+
JValue date = new JValue(new DateTime(2000, 5, 23));
+
+
array.Add(text);
+
array.Add(date);
+
+
string json = array.ToString();
+
// [
+
// "Manual text",
+
// "\/Date(958996800000+1200)\/"
+
// ]
+
+
+
+
+
Another option is to create JSON objects declaratively.
+
+
+
+
+
+
List<Post> posts = GetPosts();
+
+
JObject rss =
+
new JObject(
+
new JProperty("channel",
+
new JObject(
+
new JProperty("title", "James Newton-King"),
+
new JProperty("link", "http://james.newtonking.com"),
+
new JProperty("description", "James Newton-King's blog."),
+
new JProperty("item",
+
new JArray(
+
from p in posts
+
orderby p.Title
+
select new JObject(
+
new JProperty("title", p.Title),
+
new JProperty("description", p.Description),
+
new JProperty("link", p.Link),
+
new JProperty("category",
+
new JArray(
+
from c in p.Categories
+
select new JValue(c)))))))));
+
+
Console.WriteLine(rss.ToString());
+
+
//{
+
// "channel": {
+
// "title": "James Newton-King",
+
// "link": "http://james.newtonking.com",
+
// "description": "James Newton-King's blog.",
+
// "item": [
+
// {
+
// "title": "Json.NET 1.3 + New license + Now on CodePlex",
+
// "description": "Annoucing the release of Json.NET 1.3, the MIT license and the source being available on CodePlex",
+
// "link": "http://james.newtonking.com/projects/json-net.aspx",
+
// "category": [
+
// "Json.NET",
+
// "CodePlex"
+
// ]
+
// },
+
// {
+
// "title": "LINQ to JSON beta",
+
// "description": "Annoucing LINQ to JSON",
+
// "link": "http://james.newtonking.com/projects/json-net.aspx",
+
// "category": [
+
// "Json.NET",
+
// "LINQ"
+
// ]
+
// }
+
// ]
+
// }
+
//}
+
+
+
+
+
You can create a JSON object from a non-JSON type using the FromObject method.
+
+
+
+
+
JObject o = JObject.FromObject(new
+
{
+
channel = new
+
{
+
title = "James Newton-King",
+
link = "http://james.newtonking.com",
+
description = "James Newton-King's blog.",
+
item =
+
from p in posts
+
orderby p.Title
+
select new
+
{
+
title = p.Title,
+
description = p.Description,
+
link = p.Link,
+
category = p.Categories
+
}
+
}
+
});
+
+
+
+
+
Finally JSON objects can be created from a string use the Parse method.
+
+
+
+
+
string json = @"{
+
CPU: 'Intel',
+
Drives: [
+
'DVD read/writer',
+
""500 gigabyte hard drive""
+
]
+
}";
+
+
JObject o = JObject.Parse(json);
+
+
+
+
+
Querying JSON
+
+
+
The properties methods that are the most useful when querying JSON objects are Children, Values and the property index.
+
Children returns all the children of that object. Values is similar to Children but it allows you to specify a type you would like the values to be converted into. Finally the property index is used to get a specific child, either by index position for JSON arrays or property name for JSON objects.
+
+
+
+
+
var postTitles =
+
from p in rss["channel"]["item"].Children()
+
select p.Value<string>("title");
+
+
foreach (var item in postTitles)
+
{
+
Console.WriteLine(item);
+
}
+
+
//LINQ to JSON beta
+
//Json.NET 1.3 + New license + Now on CodePlex
+
+
var categories =
+
from c in rss["channel"]["item"].Children()["category"].Values<string>()
+
group c by c into g
+
orderby g.Count() descending
+
select new { Category = g.Key, Count = g.Count() };
+
+
foreach (var c in categories)
+
{
+
Console.WriteLine(c.Category + " - Count: " + c.Count);
+
}
+
+
//Json.NET - Count: 2
+
//LINQ - Count: 1
+
//CodePlex - Count: 1
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Src/Doc/ReadingWritingJSON.html b/Src/Doc/ReadingWritingJSON.html
new file mode 100644
index 00000000..aec08a4f
--- /dev/null
+++ b/Src/Doc/ReadingWritingJSON.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
To manually read and write JSON Json.NET provides the JsonWriter classes.
+
+
JsonTextReader and JsonTextWriter
+
JsonTextReader and JsonTextWriter are used to read and write JSON text. The JsonTextWriter has a number of settings on it to control how JSON is formatted when it is written. These options include formatting, indention character, indent count and quote character.
+
+
+
+
+
StringBuilder sb = new StringBuilder();
+
StringWriter sw = new StringWriter(sb);
+
+
using (JsonWriter jsonWriter = new JsonTextWriter(sw))
+
{
+
jsonWriter.Formatting = Formatting.Indented;
+
+
jsonWriter.WriteStartObject();
+
jsonWriter.WritePropertyName("CPU");
+
jsonWriter.WriteValue("Intel");
+
jsonWriter.WritePropertyName("PSU");
+
jsonWriter.WriteValue("500W");
+
jsonWriter.WritePropertyName("Drives");
+
jsonWriter.WriteStartArray();
+
jsonWriter.WriteValue("DVD read/writer");
+
jsonWriter.WriteComment("(broken)");
+
jsonWriter.WriteValue("500 gigabyte hard drive");
+
jsonWriter.WriteValue("200 gigabype hard drive");
+
jsonWriter.WriteEnd();
+
jsonWriter.WriteEndObject();
+
}
+
+
// {
+
// "CPU": "Intel",
+
// "PSU": "500W",
+
// "Drives": [
+
// "DVD read/writer"
+
// /*(broken)*/,
+
// "500 gigabyte hard drive",
+
// "200 gigabype hard drive"
+
// ]
+
// }
+
+
+
+
+
JsonTokenReader and JsonTokenWriter
+
JsonTokenReader and JsonTokenWriter read and write LINQ to JSON objects. They are located in the Newtonsoft.Json.Linq namespace. These objects allow you to use LINQ to JSON objects with objects that read and write JSON such as the JsonSerializer. For example you can deserialize from a LINQ to JSON object into a regular .NET object and vice versa.
+
+
+
+
+
JObject o = new JObject(
+
new JProperty("Name", "John Smith"),
+
new JProperty("BirthDate", new DateTime(1983, 3, 20))
+
);
+
+
JsonSerializer serializer = new JsonSerializer();
+
Person p = (Person)serializer.Deserialize(new JsonTokenReader(o), typeof(Person));
+
+
// John Smith
+
Console.WriteLine(p.Name);
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Src/Doc/SerializingJSON.html b/Src/Doc/SerializingJSON.html
new file mode 100644
index 00000000..1a5a746e
--- /dev/null
+++ b/Src/Doc/SerializingJSON.html
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
The quickest method of converting between JSON text and a .NET object is using
+ the JsonSerializer. The JsonSerializer converts .NET objects into their JSON
+ equivalent and back again.
+
+
+
For simple scenarios the SerializeObject and DeserializeObject methods on JavaScriptConvert provide an easy to use wrapper over
+ JsonSerializer.
+
+
+
+
+
+
Product product = new Product();
+
+
product.Name = "Apple";
+
product.Expiry = new DateTime(2008, 12, 28);
+
product.Price = 3.99M;
+
product.Sizes = new string[] { "Small", "Medium", "Large" };
+
+
string output = JavaScriptConvert.SerializeObject(product);
+
//{
+
// "Name": "Apple",
+
// "Expiry": "\/Date(1230375600000+1300)\/",
+
// "Price": 3.99,
+
// "Sizes": [
+
// "Small",
+
// "Medium",
+
// "Large"
+
// ]
+
//}
+
+
Product deserializedProduct = (Product)JavaScriptConvert.DeserializeObject(output, typeof(Product));
+
+
+
+
+
JsonSerializer
+
+
+
For more control over how an object is serialized the JsonSerializer can be used
+ directly. The JsonSerializer has a number of properties to control its behaviour
+ when serializing and deserializing.
+
+
+
+
+
Product product = new Product();
+
product.Expiry = new DateTime(2008, 12, 28);
+
+
JsonSerializer serializer = new JsonSerializer();
+
serializer.Converters.Add(new JavaScriptDateTimeConverter());
+
serializer.NullValueHandling = NullValueHandling.Ignore;
+
+
using (StreamWriter sw = new StreamWriter(@"c:\json.txt"))
+
using (JsonWriter writer = new JsonTextWriter(sw))
+
{
+
serializer.Serialize(writer, product);
+
// {"Expiry":new Date(1230375600000),"Price":0}
+
}
+
+
+
+
+
ReferenceLoopHandling
+
Controls how circular referencing objects are serialized. Error, ignore or
+ serialize.
+
MissingMemberHandling
+
Controls how missing members (e.g. JSON contains a property that isn't a member
+ on the object) are handled during deserialization. Error or ignore.
+
NullValueHandling
+
Controls how null values are handled during serialization and deserialization.
+ Include or ignore.
+
ObjectCreationHandling
+
Controls how objects are created during deserialization. Auto, reuse, replace.
+
Converters
+
A collection of JsonConverters that will be used during serialization and
+ deserialization.
+
Serialization Attributes
+
There are a number of optional attributes that can be placed on a class to control how it is serialized.
+
+
+
+
+
[JsonObject(MemberSerialization.OptIn)]
+
public class Person
+
{
+
[JsonProperty]
+
public string Name { get; set; }
+
+
[JsonProperty]
+
public DateTime BirthDate { get; set; }
+
+
// not serialized
+
public string Department { get; set; }
+
}
+
+
+
+
+
JsonObjectAttribute
+
The MemberSerialization flag on this attribute specifies whether member serialization is opt-in (a member must have the JsonPropertyAttribute to be serialized) or opt-out (everything is serialized by default but can be ignored with the JsonIgnoreAttribute).
+
JsonPropertyAttribute
+
Allows the name of the serialized member to be customized. The attribute also indicates that a member should be serialized when member serialization is set to opt-in.
+
JsonIgnoreAttribute
+
Excludes a field or property from serialization.
+
JsonConverters
+
JsonConverters allows JSON to be manually be written during serialization and read during deserialization. This is useful for particularly complex JSON structures or for when you want to change how a type is serialized.
+
To create your own custom converter inherit from the JsonConverter class. Json.NET also comes with a number of JsonConverters:
+
+
+
+
IsoDateTimeConverter
+
Converts a DateTime to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z).
+
+
JavaScriptDateTimeConverter
+
Converts a DateTime to and from a JavaScript date constructor (e.g. new Date(52231943)).
+
+
XmlNodeConverter
+
Converts an XmlNode to and from JSON. Note that to convert a JSON object it must have only a single property. This is required because properties are converted into nodes and XML can only have one root node.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Src/Doc/custom.css b/Src/Doc/custom.css
new file mode 100644
index 00000000..7a04f5f3
--- /dev/null
+++ b/Src/Doc/custom.css
@@ -0,0 +1,19 @@
+div#content {
+ padding: 0 10px 10px 10px;
+}
+
+.overflowpanel
+{
+ width: 98%;
+ border: solid 1px #ccc;
+ overflow: auto;
+ overflow-y: hidden;
+ background-color: #fcfcfc;
+ margin-bottom: 1em;
+}
+
+.overflowpanel .code
+{
+ padding: 10px 4px 20px 10px;
+ display: block;
+}
\ No newline at end of file
diff --git a/Src/Doc/doc.shfb b/Src/Doc/doc.shfb
new file mode 100644
index 00000000..1466c63c
--- /dev/null
+++ b/Src/Doc/doc.shfb
@@ -0,0 +1,56 @@
+