Gå til indhold

Use JSON format to minimize payload

Dette indhold er ikke tilgængeligt i dit sprog endnu.

The OData V3 protocol has an XML/ATOM-based representation as well as a JSON-based representation. The default format used by WCF Data Service Client (for OData V3) is ATOM despite the JSON format being about 4 times lighter than the ATOM format.

For this reason, the JSON format is recommended instead of the ATOM format in order to minimize the payload of the requests.

The format can be specified on the DataServiceContext by adding the line context.Format.UseJson(); to the request.Example