Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Serialize indexed objects

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

Serialization lets you change data into a format that can be saved or sent elsewhere.

In the context of the .NET API for Optimizely, JSON.NET turns objects into a format that can be indexed. When using the Client class, it automatically makes adjustments to how objects are serialized, which you can customize further.

This means you can choose which parts of the data to include or exclude, and decide how different parts of the data are handled during serialization.

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.