Limitations
This page describes the limitations of Nino.
Current Limitations
- Need to be used with Source Generator
- Cannot serialize/deserialize non-public fields/properties
- When attempting to serialize types that are not supported (such as Queue), a compilation error will occur
- Currently, the serialization and deserialization ends need to correspond one-to-one with the Nino serialization types (i.e., if I use Nino to serialize in Project A, there are 10 NinoType types, then when deserializing the binary generated by Project A in Project B, ensure that Project B also has exactly the same 10 NinoType types)
INFO
This limitation can currently be resolved by copying the generated code from one project to another (NinoSerializerExtension.(Ext.)g.cs and NinoDeserializerExtension.(Ext.)g.cs)
This way, you don't need to worry about whether the number of types between different projects matches, for example, when Server receives data from Client, use the Client's Deserializer, and when Client receives data from Server, use the Server's Deserializer. Each end sends data using its own Serializer
This issue arises because of the need to support polymorphism, so each type needs to be assigned a TypeId, which is currently assigned by the name of all NinoType types in order, so it is necessary to ensure that the type names of different projects are consistent, otherwise the TypeId generated by the two projects will be inconsistent, resulting in the inability to deserialize data across projects.
INFO
This limitation is now officially resolved from
Nino v3.0.0
, no additional modifications are required once migrated toNino v3.0.0
or later versions and this problem no longer exists.