-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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user