Class JsonPropertyNameAttribute
- Namespace
- Alis.Core.Aspect.Data.Json
- Assembly
- Alis.dll
Provides options for JSON.
[AttributeUsage(AttributeTargets.All)]
public sealed class JsonPropertyNameAttribute : AttributeInheritance
Inherited Members
Constructors
JsonPropertyNameAttribute()
Initializes a new instance of the Alis.Core.Aspect.Data.Json.JsonPropertyNameAttribute class.
public JsonPropertyNameAttribute()JsonPropertyNameAttribute(string)
Initializes a new instance of the Alis.Core.Aspect.Data.Json.JsonPropertyNameAttribute class.
public JsonPropertyNameAttribute(string name)Parameters
namestring-
The name to use for JSON serialization and deserialization.
JsonPropertyNameAttribute(string, bool, bool)
Initializes a new instance of the Alis.Core.Aspect.Data.Json.JsonPropertyNameAttribute class
public JsonPropertyNameAttribute(string name, bool ignoreWhenSerializing, bool ignoreWhenDeserializing)Parameters
namestring-
The name
ignoreWhenSerializingbool-
The ignore when serializing
ignoreWhenDeserializingbool-
The ignore when deserializing
Properties
DefaultValue
Gets or sets the default value.
public object DefaultValue { get; set; }Property Value
HasDefaultValue
Gets or sets a value indicating whether this instance has a default value. In this case, it's defined by the DefaultValue property.
public bool HasDefaultValue { get; set; }Property Value
IgnoreWhenDeserializing
Gets or sets a value indicating whether to ignore this instance's owner when deserializing.
public bool IgnoreWhenDeserializing { get; set; }Property Value
IgnoreWhenSerializing
Gets or sets a value indicating whether to ignore this instance's owner when serializing.
public bool IgnoreWhenSerializing { get; set; }Property Value
Name
Gets or sets the name to use for JSON serialization and deserialization.
public string Name { get; set; }