You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I wish to serialize/deserialize struct types (including readonly struct) when NativeAOT enabled, but when I use my own StaticContext, it throws NotImplementedException.
I checked the output of YamlDotNet.Analyzers.StaticGenerator and found that no code was generated for my struct.
Describe the solution you'd like
Modify source generator to support struct types.
Describe alternatives you've considered
Convert my struct to class, but it's a breaking change.
Additional context
I am using Vecc.YamlDotNet.Analyzers.StaticGenerator for source generation.
The text was updated successfully, but these errors were encountered:
We can try adding structs but I don’t know if we’ll be able to in the static serializer. We run into the issues where the compiler prevents things from code compiling due to needing constructors which would take some pretty hefty code changes and wouldn’t be reliable. I think your best bet is creating an IYamlConverter to serialize and deserialize these data types. Shouldn’t be too hard depending on the number of classes your doing.
Is your feature request related to a problem? Please describe.
I wish to serialize/deserialize struct types (including
readonly struct
) when NativeAOT enabled, but when I use my ownStaticContext
, it throwsNotImplementedException
.I checked the output of
YamlDotNet.Analyzers.StaticGenerator
and found that no code was generated for my struct.Describe the solution you'd like
Modify source generator to support struct types.
Describe alternatives you've considered
Convert my struct to class, but it's a breaking change.
Additional context
I am using
Vecc.YamlDotNet.Analyzers.StaticGenerator
for source generation.The text was updated successfully, but these errors were encountered: