RaspberryIO_26/Swan.Tiny/Formatters/JsonPropertyAttribute.cs

30 lines
803 B
C#
Raw Normal View History

2019-12-09 17:25:54 +01:00
using System;
namespace Swan.Formatters {
/// <summary>
/// An attribute used to help setup a property behavior when serialize/deserialize JSON.
/// </summary>
/// <seealso cref="Attribute" />
[AttributeUsage(AttributeTargets.Property)]
public sealed class JsonPropertyAttribute : Attribute {
/// <summary>
/// Gets or sets the name of the property.
/// </summary>
/// <value>
/// The name of the property.
/// </value>
public String PropertyName {
get;
}
/// <summary>
/// Gets or sets a value indicating whether this <see cref="JsonPropertyAttribute" /> is ignored.
/// </summary>
/// <value>
/// <c>true</c> if ignored; otherwise, <c>false</c>.
/// </value>
public Boolean Ignored {
get;
}
}
}