-Added Order to JsonPropertyAttribute to override the order of serialized JSON

This commit is contained in:
JamesNK
2011-08-02 02:58:22 +00:00
parent 628e7977e8
commit 29b32aa2cb
4 changed files with 75 additions and 1 deletions
@@ -16,6 +16,7 @@ namespace Newtonsoft.Json
internal ObjectCreationHandling? _objectCreationHandling;
internal TypeNameHandling? _typeNameHandling;
internal bool? _isReference;
internal int? _order;
/// <summary>
/// Gets or sets the null value handling used when serializing this property.
@@ -77,6 +78,16 @@ namespace Newtonsoft.Json
set { _isReference = value; }
}
/// <summary>
/// Gets or sets the order of serialization and deserialization of a member.
/// </summary>
/// <value>The numeric order of serialization or deserialization.</value>
public int Order
{
get { return _order ?? default(int); }
set { _order = value; }
}
/// <summary>
/// Gets or sets the name of the property.
/// </summary>