Skip to Content
author's profile photo Former Member
Former Member

Change oData response in JSON

Hi all oData and Gateway experts,

I'm very new in this topic and would like to ask some help from you guys.

Just wondering when getting response from Gateway in JSON format, is it possible to remove __metadata block?

I'm asking because if I going to return 100 records and they are all have __metadata block, it will slow down the communication.

Regards,

Pan

pastedImage_0.png (25.1 kB)
Add comment
10|10000 characters needed characters exceeded

3 Answers

  • Best Answer
    Posted on Sep 17, 2014 at 03:53 AM

    Hi Attasart,

    Be noticed that we are developing OData services. As per the standards(yes, we have to follow the standards), metadata block is a mandatory component of the return Odata payload. You can not remove that part. And , Odata is not intended for transferring heavy data from server to the browser. If you come across such a situation , you need to follow lazy loading (use $top and $skip to control the data flow).

    Sreehari

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 17, 2014 at 04:54 AM

    Hello Attasart,

    It is the standard format in which your response if encapsulated and we do not have any control over it. Hence we cannot remove that in GW level.

    There are some standard ways like Skip-Top, Skip-Token , Delta-Query which u can think of when there are scenarios involving transfer of huge volume of data.

    Regards,

    Ashwin

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 17, 2014 at 05:01 AM

    Thanks guys. It's all clear now 😊

    Add comment
    10|10000 characters needed characters exceeded