[Question] Using System.Text.Json.JsonSerializer.SerializeToUtf8Bytes #45
Labels
Question
Question about this project
Resolved: Answered
The question raised by the author has been answered
Hi,
I have a list of complex objects that are rendered in a Telerik Blazor Grid. When I select items in the grid the grid's OnItemSelected event sends an
IEnumerable<T>
of all the selected items in the grid.I can save this to a property in the Blazor component.
What I want to be able to do is persist that data so that if a user navigates away from the page that has the grid and then returns back I can populate the grid and select the items in the grid that were selected before.
I thought I would try and use
System.Text.Json.JsonSerializer.SerializeToUtf8Bytes
as it's suppose to be quicker than storing as a JSON string and therefore I'm also assuming it might take up less storage space in the browser's session storage.Would I be able to use
System.Text.Json.JsonSerializer.SerializeToUtf8Bytes
to create abyte[]
then store and retrieve thatbyte[]
array like this:The text was updated successfully, but these errors were encountered: