HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Customize serialization of indexed objects

Describes how to customize the serialization of indexed objects in Optimizely Search & Navigation.

Serialization converts indexed objects into a form that can persist or be transported. 

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

You can customize it in two ways:

  • By using attributes – you can apply common customizations to classes you can modify.
  • By customizing conventions used by the Client – you can do powerful things like customizing multiple classes simultaneously and including return values from extension methods without modifying the classes of the serialized objects.