Currently I need to define a custom JsonConverter to serialize the state of the grid. I would prefer not to have to do this, however I understand that may just be the way things are for now. Creating this ticket / issue to track if this is ever changed to not being needed.
For now I'll be setting up two serializers, one just for the grids that uses Newtonsoft, and the one I would prefer to use that uses System.Text.Json, https://github.com/Blazored/LocalStorage.
From https://docs.telerik.com/blazor-ui/components/grid/state
// to store the serialized grid state, we need to have a custom serialized // based on Newtonsoft.Json serialization. In the future this may not be required public class FilterDescriptorJsonConverter : JsonConverter {
///rest omitted
}
Hi Ben,
When we created the grid state, it was impossible to serialize it in any other way. Since then, the System.Text.Json serializer evolved a bit and allowed us to do some things. With our upcoming 2.13.0 release, Newtonsoft.Json and a custom converter won't be needed.
I made the change in the docs so it is ready and waiting for the release, and you can preview it in this commit: https://github.com/telerik/blazor-docs/commit/d86862a2fbb12d487941a3306f1f3e94cd23b5c7.
Regards,
Marin Bratanov
Progress Telerik