Class JsonPropertyNameAttribute
- Namespace
- Alis.Core.Aspect.Data.Json
- Assembly
- Alis.dll
Provides options for JSON.
[AttributeUsage(AttributeTargets.All)]
public sealed class JsonPropertyNameAttribute : Attribute
Inheritance
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
name
string-
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
name
string-
The name
ignoreWhenSerializing
bool-
The ignore when serializing
ignoreWhenDeserializing
bool-
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; }