-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: V4.0_ERRATA02
-
Fix Version/s: V4.01_WD01
-
Labels:
-
Environment:
[Proposed]
-
Proposal:
-
Resolution:
We see a lot of scenarios where people are building REST services that return JSON payloads, but the JSON they need or want to generate is not supported by OData (for example, a mixed array or an array of arrays). This payload still has structure, it just can't necessarily be described by OData CSDL.
For such payloads we could add an Edm.Untyped data type. Services could use Edm.Untyped to advertise that there was a property of a particular name present, but there is no type to describe the structure of the schema. It is essentially treated as an open property.
The value of an Edm.Untyped property may be a primitive value, a structural value, or a collection. If a collection, it may contain any combination of primitive values, structural values, or collections (this is the only place a collection can contain a collection or a collection can contain a mix of primitive values, structural values, or collections).
Edm.Untyped could also be used within a payload to specify that the current structured object has no declared type. It is either an anonymous structured (i.e., complex) type or an array.
All structured dynamic properties, and all children of an Edm.Untyped property, are assumed to be untyped unless they are annotated with the "@odata.type" term, in which case they must conform to the type described by the annotation.