Add serde.NET to the feature comparison table#453
Conversation
|
@agocke would you care to review this? I want to report accurately. |
|
Happy to, thanks. Do you have a section on unsafe code? That might be relevant from a security perspective. |
No. Would it cover what the library uses internally, or what it source generates? And what is unsafe code? C#'s |
|
@agocke for your convenience in reviewing, here is the rendered version. |
|
Re unsafe, I think this is relevant context: dotnet/designs#330. In other words, yes there are lots of things that may play into unsafe, even though they're not currently marked as such |
agocke
left a comment
There was a problem hiding this comment.
Looks right to me, for now. Some stuff may change assuming I get more time to work on this
| Surrogate types for automatic serialization of unserializable types | [✅](surrogate-types.md) | ❌ | [✅](https://serdedotnet.github.io/foreign-types.html) | | ||
| Custom converters | [✅](custom-converters.md) | ✅ | [✅](https://serdedotnet.github.io/customization.html) | ||
| Stateful converters | [✅](custom-converters.md#stateful-converters) | ❌ | ❌ | | ||
| Deserialization callback | [✅](xref:Nerdbank.MessagePack.IMessagePackSerializationCallbacks) | [✅](https://github.com/MessagePack-CSharp/MessagePack-CSharp?tab=readme-ov-file#serialization-callback) | ❌ | |
There was a problem hiding this comment.
Hmm, how does this work? How can you call an instance method on an object before it has been deserialized?
There was a problem hiding this comment.
We invoke the callbacks between running the constructor and setting the properties.
This has its limitations, of course. And in particular with PolyType, once a type has required or init properties, all property sets are grouped within the pseudo-constructor, so we don't do an OnBeforeDeserialization callback there. But OnAfterDeserialization of course works.
| Reference preservation | [✅](xref:Nerdbank.MessagePack.MessagePackSerializer.PreserveReferences) | ❌ | ❌ | | ||
| Cyclical references | [✅](xref:Nerdbank.MessagePack.MessagePackSerializer.PreserveReferences) | ❌ | ❌ | | ||
| JSON schema export | [✅](xref:Nerdbank.MessagePack.MessagePackSerializer.GetJsonSchema*) | ❌ | ❌ | | ||
| Secure defaults | [✅](security.md) | ❌ | ❌ | |
There was a problem hiding this comment.
Is an example of a problematic structure Dictionary<int, int> because it's not collision-resistant?
There was a problem hiding this comment.
That's not an example I would use because I don't know how well int as a key works in the dictionary for collision resistance. But that might be a good one.
I would tend to all the other types, including user-defined types, for which GetHashCode is implemented without collision resistance in mind.
|
Thanks for reviewing. I'll be happy to update (or take PRs) to update this column as you make updates to serde.NET. |
No description provided.