Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1033

V4: @odata.type annotation incorrect for primitive types

    XMLWordPrintableJSON

Details

    Description

      The @odata.type annotation is incorrecty serialized for primitive types. the current behavior has this output: ...@odata.type":"Int32" but should look like this: ...@odata.type":"#Int32"

      Here the specfication part:
      4.5.3 Annotation odata.type
      The odata.type annotation specifies the type of a JSON object or name/value pair. Its value is a URI that identifies the type of the property or object. For built-in primitive types the value is the unqualified name of the primitive type, specified as a URI fragment.
      Example:
      {
      "@odata.context": "http://host/service/$metadata#Customers/$entity",
      "@odata.type": "#Model.VipCustomer",
      "ID": 2,
      "DynamicLimit": "INF",
      "DynamicLimit@odata.type": "#Double",
      ...
      }

      Attachments

        Activity

          People

            chrisam Christian Amend
            chrisam Christian Amend
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: