-Added JsonSerializer argument to JsonConverter.ReadJson and JsonConverter.WriteJson. Needed because serializer now has state

-Added CustomCreationConverter
-Added IsReference to JsonContainerAttribute
-Added PreserveReferencesHandling to JsonSerializer
-Added IReferenceResolver to JsonSerializer
-Split internals of JsonSerializer into JsonSerializerWriter (serializes) and JsonSerializerReader (deserializes)
-Moved serialize stack from JsonWriter (yuck) to JsonSerializerWriter (yay)
-Added FromObject overload with JsonSerializer argument for cases when state is needed
This commit is contained in:
JamesNK
2009-05-13 10:15:41 +00:00
parent 3b26adfdd1
commit f0c5be266b
41 changed files with 2467 additions and 717 deletions
@@ -40,6 +40,16 @@ namespace Newtonsoft.Json
public string Title { get; set; }
public string Description { get; set; }
// yuck. can't set nullable properties on an attribute in C#
// have to use this approach to get an unset default state
internal bool? _isReference;
public bool IsReference
{
get { return _isReference ?? default(bool); }
set { _isReference = value; }
}
/// <summary>
/// Initializes a new instance of the <see cref="JsonContainerAttribute"/> class.
/// </summary>