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

JsonPropertyAttribute Class

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.
Meta::WitAi::Json::JsonPropertyAttribute extends Attribute.

Overview

Properties

string
Property name used to convert json
object
Default value for property

Public Member Functions

Constructor that defaults to an empty property name
JsonPropertyAttribute
( string propertyName )
Constructor that sets property name
JsonPropertyAttribute
( string propertyName,
object defaultValue )
Construct for property name and default value

Details

Properties

string Meta.WitAi.Json.JsonPropertyAttribute.PropertyName
Property name used to convert json
object Meta.WitAi.Json.JsonPropertyAttribute.DefaultValue
Default value for property

Member Functions

Meta.WitAi.Json.JsonPropertyAttribute.JsonPropertyAttribute ( )
Constructor that defaults to an empty property name
Meta.WitAi.Json.JsonPropertyAttribute.JsonPropertyAttribute
( string propertyName )
Constructor that sets property name
Parameters
propertyName
Name to be read from json
Meta.WitAi.Json.JsonPropertyAttribute.JsonPropertyAttribute
( string propertyName,
object defaultValue )
Construct for property name and default value
Parameters
propertyName
Name to be read from json
defaultValue
Default value when the json object is missing
Did you find this page helpful?
Thumbs up icon
Thumbs down icon