This content is archived. See latest version here.

Last updated: Feb 23 2015

Introduction

The .NET API uses JSON.NET to serialize objects that are to be indexed. When using the Client class some customizations are automatically made to the serialization but further customization is possible. By customizing how objects are serialized it is possible to include additional fields, exclude fields, handle how fields are serialized and so on.

Customization methods

Customization can be done in two ways:

  • By using attributes
  • By customizing conventions used by the Client

Attributes enable us to quickly apply common customizations to classes that we can modify. The conventions on the other hand, enable us to do very powerful customizations (such as customizing multiple classes at the same time and including return values from extension methods). without having to modify the the classes of the objects being serialized.

Comments