Skip to content

SatSearchSerializer

Sam Gerene edited this page May 21, 2018 · 2 revisions

The satsearch API is exposed over HTTP and uses JSON to serialize the data. The SatSearchSerializer is used to deserialize the JSON that is serviced by the API. The SatSearchSerializer implements the ISatSearchSerializer interface and is injectable using MEF.

The ISatSearchSerializer is a dependency of the SatSearchService, the SatSearchService uses it to deserialize the JSON and transform it into the appropriate satsearch model objects.

An API developer does not need to use SatSearchSerializer directly, it only needs to be provided to the SatSearchService, preferable by means of dependency injection using a framework like MEF.

Both string and stream deserialization are supported by the ISatSearchSerializer interface. When possible stream deserialization should be used, this has better performance than string deserialization.

var serializer = new SatSearchSerializer();
var productResult = serializer.DeserializeProductResult(stream);

The popular Json.NET library is used by the satsearch-SDK

satsearch-SDK

  1. Home
  2. Documentation Overview
  3. Getting your API tokens
  4. Roadmap

Library guts explained

  1. Credentials
  2. HttpClientService
  3. Serializer
  4. SatSearchService

Clone this wiki locally