Skip to content

Commit

Permalink
ODATA-1498 (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen authored Nov 8, 2023
1 parent d577e9c commit a9998a0
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 13 deletions.
3 changes: 1 addition & 2 deletions docs/odata-csdl-json/odata-csdl-json.html
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,7 @@ <h2 id="35-built-in-abstract-types"><a name="BuiltInAbstractTypes" href="#BuiltI
</ul></li>
<li><code>Collection(Edm.PrimitiveType)</code>
<ul>
<li>cannot be used as the type of a property or term.</li>
<li>cannot be used as the type of a parameter or the return type of an action or function.</li>
<li>cannot be used.</li>
</ul></li>
<li><code>Collection(Edm.Untyped)</code>
<ul>
Expand Down
4 changes: 1 addition & 3 deletions docs/odata-csdl-json/odata-csdl-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -867,9 +867,7 @@ be used anywhere a corresponding concrete type can be used, except:
- cannot be used as the underlying type of a type definition or
enumeration type.
- `Collection(Edm.PrimitiveType)`
- cannot be used as the type of a property or term.
- cannot be used as the type of a parameter or the return type of
an action or function.
- cannot be used.
- `Collection(Edm.Untyped)`
- cannot be returned in a payload with an `OData-Version` header
of `4.0`. Services should treat untyped properties as dynamic
Expand Down
3 changes: 1 addition & 2 deletions docs/odata-csdl-xml/odata-csdl-xml.html
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,7 @@ <h2 id="35-built-in-abstract-types"><a name="BuiltInAbstractTypes" href="#BuiltI
</ul></li>
<li><code>Collection(Edm.PrimitiveType)</code>
<ul>
<li>cannot be used as the type of a property or term.</li>
<li>cannot be used as the type of a parameter or the return type of an action or function.</li>
<li>cannot be used.</li>
</ul></li>
<li><code>Collection(Edm.Untyped)</code>
<ul>
Expand Down
4 changes: 1 addition & 3 deletions docs/odata-csdl-xml/odata-csdl-xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -796,9 +796,7 @@ be used anywhere a corresponding concrete type can be used, except:
- cannot be used as the underlying type of a type definition or
enumeration type.
- `Collection(Edm.PrimitiveType)`
- cannot be used as the type of a property or term.
- cannot be used as the type of a parameter or the return type of
an action or function.
- cannot be used.
- `Collection(Edm.Untyped)`
- cannot be returned in a payload with an `OData-Version` header
of `4.0`. Services should treat untyped properties as dynamic
Expand Down
2 changes: 2 additions & 0 deletions docs/odata-json-format/odata-json-format.html
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ <h3 id="453-control-information-type-odatatype"><a name="ControlInformationtypeo
<li>The special floating-point values <code>-INF</code>, <code>INF</code>, and <code>NaN </code>are serialized as strings and MUST have a <a href="#ControlInformationtypeodatatype"><code>type</code></a> control information to specify the numeric type of the property.</li>
<li>String values do have a first class representation in JSON, but there is an obvious collision: OData also encodes a number of other primitive types as strings, e.g. <code>DateTimeOffset</code>, <code>Int64</code> in the presence of the <a href="#ControllingtheRepresentationofNumbers"><code>IEEE754Compatible</code></a> format parameter etc. If a property appears in JSON string format, it should be treated as a string value unless the property is known (from the metadata document) to have a different type.</li>
</ul>
<p>The <code>type</code> control information can be absent in properties nested in an instance of type <code>Edm.Untyped</code>. In particular, individual primitive values within a collection cannot have <code>type</code> control information.</p>
<p>For more information on namespace- and alias-qualified names, see <a href="#ODataCSDL">OData-CSDLJSON</a> or <a href="#ODataCSDL">OData-CSDLXML</a>.</p>
<div class="example">
<p>Example 5: entity of type <code>Model.VipCustomer</code> defined in the metadata document of the same service with a dynamic property of type <code>Edm.Date</code></p>
Expand Down Expand Up @@ -801,6 +802,7 @@ <h2 id="73-collection-of-primitive-values"><a name="CollectionofPrimitiveValues"
<span id="cb16-8"><a href="#cb16-8" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;EmailAddresses@nextLink&quot;</span><span class="fu">:</span> <span class="st">&quot;...&quot;</span></span>
<span id="cb16-9"><a href="#cb16-9" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
</div>
<p>A collection of primitive values that occurs in a property of type <code>Edm.Untyped</code> is interpreted as a collection of <code>Edm.Boolean</code>, <code>Edm.String</code>, and <code>Edm.Decimal</code> values, depending on the JavaScript type.</p>
<h2 id="74-collection-of-complex-values"><a name="CollectionofComplexValues" href="#CollectionofComplexValues">7.4 Collection of Complex Values</a></h2>
<p>A collection of complex values is represented as a JSON array; each element in the array is the representation of a <a href="#ComplexValue">complex value</a>. A JSON literal <code>null</code> represents a null value within the collection. An empty collection is represented as an empty array.</p>
<div class="example">
Expand Down
7 changes: 7 additions & 0 deletions docs/odata-json-format/odata-json-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,9 @@ information:
should be treated as a string value unless the property is known (from
the metadata document) to have a different type.

The `type` control information can be absent in properties nested in an instance of type `Edm.Untyped`.
In particular, individual primitive values within a collection cannot have `type` control information.

For more information on namespace- and alias-qualified names, see
[OData-CSDLJSON](#ODataCSDL) or
[OData-CSDLXML](#ODataCSDL).
Expand Down Expand Up @@ -1477,6 +1480,10 @@ Example 14: partial collection of strings with next link
```
:::

A collection of primitive values that occurs in a property of type `Edm.Untyped`
is interpreted as a collection of `Edm.Boolean`, `Edm.String`, and `Edm.Decimal` values,
depending on the JavaScript type.

## <a name="CollectionofComplexValues" href="#CollectionofComplexValues">7.4 Collection of Complex Values</a>

A collection of complex values is represented as a JSON array; each
Expand Down
4 changes: 1 addition & 3 deletions odata-csdl/1 Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -831,9 +831,7 @@ be used anywhere a corresponding concrete type can be used, except:
- cannot be used as the underlying type of a type definition or
enumeration type.
- `Collection(Edm.PrimitiveType)`
- cannot be used as the type of a property or term.
- cannot be used as the type of a parameter or the return type of
an action or function.
- cannot be used.
- `Collection(Edm.Untyped)`
- cannot be returned in a payload with an `OData-Version` header
of `4.0`. Services should treat untyped properties as dynamic
Expand Down
3 changes: 3 additions & 0 deletions odata-json-format/4 Common Characteristics.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ information:
should be treated as a string value unless the property is known (from
the metadata document) to have a different type.

The `type` control information can be absent in properties nested in an instance of type `Edm.Untyped`.
In particular, individual primitive values within a collection cannot have `type` control information.

For more information on namespace- and alias-qualified names, see
[OData-CSDLJSON](#ODataCSDL) or
[OData-CSDLXML](#ODataCSDL).
Expand Down
4 changes: 4 additions & 0 deletions odata-json-format/7 Structural Property.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ Example ##ex: partial collection of strings with next link
```
:::

A collection of primitive values that occurs in a property of type `Edm.Untyped`
is interpreted as a collection of `Edm.Boolean`, `Edm.String`, and `Edm.Decimal` values,
depending on the JavaScript type.

## ##subsec Collection of Complex Values

A collection of complex values is represented as a JSON array; each
Expand Down

0 comments on commit a9998a0

Please sign in to comment.