Replies: 1 comment 6 replies
|
Interesting, thanks for pinging me! Currently I'm working on a Unity project which unfortunately means that limited by the C# compiler version. I don't feel comfortable patching the Unity installation to support C# 12 with UnityRoslynUpdater [and introducing this as a workflow for other team members, CI workers, etc.]. This limitation might be lifted in the future if Unity's .NET modernization initiative finally gets anywhere. The "public is serialized, opt-in with attribute" workflow somewhat matches the Unity's serialization system, which makes things easier to reason about. Taking a quick look at the docs I'm not sure what the specific rules regarding property serialization are, especially considering get-only computed properties (feels weird that these would be considered for serialization by default, but maybe I'm just used to Unity not considering properties at all), and similar edge cases. I think I'd prefer if both systems used explicit opt-in, but having roughly the same serialization rules is the second best option, given that I'm dealing with two serialization systems for the same types. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
@apkd @jahu00 @fr0 expressed an interest in a way to avoid the need to attribute members with
[IgnoreMember]in MessagePack-CSharp.As a major contributor to MessagePack-CSharp, I wanted to invite you all to try out Nerdbank.MessagePack (which I think of as its successor), which takes a different approach of almost no attributes needed at all, and public members are serialized by default. So you only need attributes to include non-public members or exclude public members. Would that help your scenario?
Learn more with our getting started guide.
All reactions