ODataMessageReaderSettings.UndeclaredPropertyBehaviorKinds Property

Gets or sets the behavior the reader should use when it finds undeclared property.

Namespace:  Microsoft.Data.OData
Assembly:  Microsoft.Data.OData (in Microsoft.Data.OData.dll)

Syntax

'Declaration
Public Property UndeclaredPropertyBehaviorKinds As ODataUndeclaredPropertyBehaviorKinds 
    Get 
    Set
'Usage
Dim instance As ODataMessageReaderSettings 
Dim value As ODataUndeclaredPropertyBehaviorKinds 

value = instance.UndeclaredPropertyBehaviorKinds

instance.UndeclaredPropertyBehaviorKinds = value
public ODataUndeclaredPropertyBehaviorKinds UndeclaredPropertyBehaviorKinds { get; set; }
public:
property ODataUndeclaredPropertyBehaviorKinds UndeclaredPropertyBehaviorKinds {
    ODataUndeclaredPropertyBehaviorKinds get ();
    void set (ODataUndeclaredPropertyBehaviorKinds value);
}
member UndeclaredPropertyBehaviorKinds : ODataUndeclaredPropertyBehaviorKinds with get, set
function get UndeclaredPropertyBehaviorKinds () : ODataUndeclaredPropertyBehaviorKinds 
function set UndeclaredPropertyBehaviorKinds (value : ODataUndeclaredPropertyBehaviorKinds)

Property Value

Type: Microsoft.Data.OData.ODataUndeclaredPropertyBehaviorKinds
The behavior the reader should use when it finds undeclared property.

Remarks

This setting has no effect if there's no model specified for the reader. This setting must be set to Default when reading request payloads. Detailed behavior description: ODataUndeclaredPropertyBehaviorKind.Default If an undeclared property is found reading fails. ODataUndeclaredPropertyBehaviorKind.DisableReferencePropertyValidation ATOM - Undeclared deferred navigation link will be read and reported. - Undeclared expanded navigation link will fail. - Undeclared stream property link (both read and edit) will be read and reported. - Undeclared association link will be read and reported. - Undeclared properties inside m:properties fail. JSON - If an undeclared property is found a detection logic will run: - __deferred value is found - the link will be read and reported as a deferred navigation link. - __mediaresource value is found - the link will be read and reported as a stream property - If nothing from the above matches the reading fails. - Undeclared association links inside __metadata/properties will be read and reported. ODataUndeclaredPropertyBehaviorKind.IgnoreValueProperty ATOM - Undeclared property inside m:properties is ignored (not even read). - Undeclared navigation link, stream property link or association link fail. JSON - If an undeclared property is found a detection logic will run: - __deferred value is found - fail as undeclared deferred nav. link. - __mediaresource value is found - fail as undeclared stream property. - All other properties are ignored and not read. - Undeclared association links inside __metadata/properties fail. ODataUndeclaredPropertyBehaviorKind.DisableReferencePropertyValidation | ODataUndeclaredPropertyBehaviorKind.IgnoreValueProperty ATOM - Undeclared deferred navigation link will be read and reported. - Undeclared expanded navigation link will be read and the navigation link part will be reported, the expanded content will be ignored and not read or reported. (Same goes for entity reference links). - Undeclared stream property link (both read and edit) will be read and reported. - Undeclared association link will be read and reported. - Undeclared properties inside m:properties will be ignored and not read. JSON - If an undeclared property is found a detection logic will run: - __deferred value is found - read and report a deferred navigation link. - __mediaresource value is found - read and report stream property. - All other properties are ignore and not read. - Undeclared association links inside __metadata/properties are read and reported. Note that there's one difference between ATOM and JSON. In ATOM expanded links are treated as both reference property and value property. The link itself is the reference part, the expanded content is the value part. In JSON expanded links are treated as a value property as a whole. Since in JSON expanded links don't actually have the reference part (the payload doesn't contain the "href") this is not such a big difference.

See Also

Reference

ODataMessageReaderSettings Class

Microsoft.Data.OData Namespace