-Improved support for deserializing objects using non-default constructors

-JsonConverterAttribute now allowed on constructor parameters
-JsonPropertyAttribute now allowed on constructor parameters
This commit is contained in:
JamesNK
2011-05-02 10:52:01 +00:00
parent 21a2a7e4f7
commit 045a1ec334
19 changed files with 467 additions and 111 deletions
@@ -10,7 +10,7 @@ namespace Newtonsoft.Json
/// <summary>
/// Instructs the <see cref="JsonSerializer"/> to use the specified <see cref="JsonConverter"/> when serializing the member or class.
/// </summary>
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface | AttributeTargets.Enum, AllowMultiple = false)]
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Parameter, AllowMultiple = false)]
public sealed class JsonConverterAttribute : Attribute
{
private readonly Type _converterType;