The QuickBooks Online .NET SDK supports serialization of requests and responses to XML and JSON formats, and compression of data to GZip and Deflate formats. This collectively helps to reduce the size of request and response messages exchanged across networks, which in turn improves the performance of service calls (both sync and async) to QuickBooks Online. For more information, see Making calls with the REST API.
The SDK allows you to set the serialization and compression format in the config file. If the custom configuration is not defined, the SDK uses the default values to serialize and compress the request and response data. The following section describes steps to set the serialization and data compression in the configuration file.
Note
Note
Data compression is not supported for Platform Service calls.
1. Configure serialization and data compression
You can define either the compression or serialization value alone and let the SDK use the default value for the undefined feature. Setting the compression value to none leaves the data uncompressed. The following code sample shows how to set serialization format of requests and responses to Json and compression to GZip:
1 2 3 4 5 6 7 8 9 10 | "Message":{ "Request":{ "CompressionFormat":"GZip", "SerializationFormat":"Json" }, "Response":{ "CompressionFormat":"GZip", "SerializationFormat":"Json" } } |
Note
Note
For steps to override the default settings, see Configuration.