Parsing Data in Xamarin Forms

前端 未结 1 558
闹比i
闹比i 2020-12-22 06:56

I would like to get the names in collection href(CustomerDemographics, Customers, Employees, Order Details) to populate a listview. I would like to know how to parse these i

相关标签:
1条回答
  • 2020-12-22 07:08

    From the attached image it seems that you're requesting the service document of the OData service. Namely the http://host/service/ endpoint of the service. If you would like to get the content of the collections, you should append the names of the collections to the end of the service document URL, such as:

    GET http://host/service/Categories
    GET http://hsot/service/CustomerDemographics
    

    The format of the response payload depends on the protocol version of the OData service. If you are talking to a OData V4 service (it actually seems a lot like you are querying the Northwind OData V4 sample service: http://services.odata.org/v4/northwind/northwind.svc/), the response payload will be in JSON format and you can use the ways that you are familiar with to parse the response.

    In addition, I would recommend you go through the basic tutorial on OData.org so that you can get a better grasp of OData requests: http://www.odata.org/getting-started/basic-tutorial/

    0 讨论(0)
提交回复
热议问题