cancel
Showing results for 
Search instead for 
Did you mean: 

Change oData response in JSON

pan_jittibophit2
Explorer
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

sreehari_vpillai
Active Contributor
0 Kudos

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

Answers (2)

Answers (2)

pan_jittibophit2
Explorer
0 Kudos

Thanks guys. It's all clear now

kvrsaicharan1152
Explorer
0 Kudos

How do you remove that metadata can you explain me

AshwinDutt
Active Contributor
0 Kudos

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