Skip to content

OData V2: JSON verbose response format #2145

@HeikoTheissen

Description

@HeikoTheissen

https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-odata/670aaf17-aafe-47ef-89fe-010e40373471 demands a results element in a response that describes a collection of primitive values:

 ; OData 2.0 response Verbose JSON representation of a collection of EDMSimpleType values:
 entityCollPrimValueInVJson2 = quotation-mark "results" quotation-mark
                              name-seperator
                              begin-array
                              entityPropertyValueInVJson
                              ; see section 2.2.6.3.8
                              *(value-seperator entityPropertyValueInVJson)
                              end-array
  1. Where does this document specify the d element that wraps responses?

  2. However, https://www.odata.org/documentation/odata-version-2-0/json-format/, section 16 specifies a different format for an operations response that describes a collection of primitive values:

    { "d" : [ 0, 1, 2 ] }

    But the Microsoft Learn document does not mention a different format for operations responses. Which is correct?

  3. Also, section 12 of the odata.org document contains a syntactically wrong example:

    { "d" : { "results": { "Name": "Bread" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Open

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions