Class JsonPropertyAttribute
An attribute used to help setup a property behavior when serialize/deserialize JSON.
Namespace: Swan.Formatters
Syntax
public sealed class JsonPropertyAttribute : Attribute
Constructors
JsonPropertyAttribute(String, Boolean)
Initializes a new instance of the JsonPropertyAttribute class.
Declaration
public JsonPropertyAttribute(string propertyName, bool ignored = false)
Parameters
| Type | Name | Description |
|---|---|---|
| String | propertyName | Name of the property. |
| Boolean | ignored | if set to |
Properties
Ignored
Gets or sets a value indicating whether this JsonPropertyAttribute is ignored.
Declaration
public bool Ignored { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
PropertyName
Gets or sets the name of the property.
Declaration
public string PropertyName { get; }
Property Value
| Type | Description |
|---|---|
| String | The name of the property. |