Custom Serializer for Spread<T>

Hi Serializers,


(based on the helppatch HowTo Register Custom Serializer.vl)

Is there a way to provide a custom Serializer for Spread that produces the what i want result from the screenshot?

I can patch around, but i want the custom serializer do that job when he’s getting called.

1 Like

maybe it’s not possible because c# always serializes to XML which doesn’t allow an array on top level?

hm…

.NET 6 introduced System.Text.Json.JsonSerializer which as the name suggests directly serializes JSON.
a quick c# test with a System.Collection.Generics.List of structs yields the result you want and i guess spread should look the same.

there are also a couple of blogposts by msft on how they spend time to optimize serialization performance on that JsonSerializer.

3 Likes

@woei is it only accessible by “adding .NET Framework Assembly” in a patch for now?

yes, CTRL-Shift-E > add System.Text.Json and then you can use it

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.