-Added JSON Schema implementation

-Move test serialization objects to TestObjects namespace
-Fixed JsonConvert to always write a floating point number with a decimal place
-Changed Type values to serialize and deserialize to type name string
-Fixed JsonWriter to allow objects and arrays to be written in a constructor
-Added JsonContainerAttribute with Id, Title and Description members. JsonObject and JsonArray inherit from this attribute
-Added JsonArrayAttribute. Has flag to control whether array can contain null items.
-Added IsRequired to JsonProperty
-Replaced protected method GetSerializableMembers with GetMemberMappings on JsonSerializer
-Fixed QuoteChar not getting set when parsing property name
-Added Load(JsonReader) to JProperty, JConstructor
-Fixed error when populating JProperty with content from collection
-Added the ability for JsonTokenWriter to write individual values as well as arrays and objects
-Added CreateReader to JToken
-Added FromObject to JToken
-Added ReadFrom to JToken
This commit is contained in:
JamesNK
2009-01-02 05:29:31 +00:00
parent f95868233e
commit 0319263756
113 changed files with 8324 additions and 741 deletions
+5 -2
View File
@@ -122,9 +122,9 @@ namespace Newtonsoft.Json
private int _top;
private List<JsonTokenType> _stack;
private List<object> _serializeStack;
private State _currentState;
private Formatting _formatting;
private List<object> _serializeStack;
internal List<object> SerializeStack
{
@@ -192,7 +192,7 @@ namespace Newtonsoft.Json
/// </summary>
public JsonWriter()
{
_stack = new List<JsonTokenType>(1);
_stack = new List<JsonTokenType>(8);
_stack.Add(JsonTokenType.None);
_currentState = State.Start;
_formatting = Formatting.None;
@@ -529,6 +529,9 @@ namespace Newtonsoft.Json
case JsonTokenType.Array:
_currentState = State.Array;
break;
case JsonTokenType.Constructor:
_currentState = State.Array;
break;
case JsonTokenType.None:
_currentState = State.Start;
break;