using System;
using System.Collections.Generic;
using System.Text;
namespace CYQ.Data.Json
{
///
/// Json 转换忽略的字段
///
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class JsonIgnoreAttribute : Attribute
{
}
///
/// Json 格式化【时间】
///
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class JsonFormatAttribute : Attribute
{
private string _DatetimeFormat;
public string DatetimeFormat
{
get { return _DatetimeFormat; }
set { _DatetimeFormat = value; }
}
public JsonFormatAttribute(string datetimeFormat)
{
_DatetimeFormat = datetimeFormat;
}
}
///
/// Json 枚举字段转字符串
///
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class JsonEnumToStringAttribute : Attribute
{
}
///
/// Json 枚举字段转属性描述
///
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class JsonEnumToDescriptionAttribute : Attribute
{
}
}