API reference
API reference
Select your platform
No SDKs available
No versions available

JsonPropertyAttribute Class

Extends Attribute
An attribute to be used to tag a field/property that should be serialized/deserialized via JsonConvert even if marked as internal. It will serialize to the provided property name instead of the default name if provided. It will also deserialize the property name if setup. The default value will be used if deserialized is not possible.

Constructors

JsonPropertyAttribute ()
Constructor that defaults to an empty property name
Signature
Meta.WitAi.Json.JsonPropertyAttribute.JsonPropertyAttribute()
JsonPropertyAttribute ( propertyName )
Constructor that sets property name
Signature
Meta.WitAi.Json.JsonPropertyAttribute.JsonPropertyAttribute(string propertyName)
Parameters
propertyName: string  Name to be read from json
JsonPropertyAttribute ( propertyName , defaultValue )
Construct for property name and default value
Signature
Meta.WitAi.Json.JsonPropertyAttribute.JsonPropertyAttribute(string propertyName, object defaultValue)
Parameters
propertyName: string  Name to be read from json
defaultValue: object  Default value when the json object is missing

Properties

DefaultValue : object
[Get]
Default value for property
Signature
object Meta.WitAi.Json.JsonPropertyAttribute.DefaultValue
PropertyName : string
[Get]
Property name used to convert json
Signature
string Meta.WitAi.Json.JsonPropertyAttribute.PropertyName