问题
I just realized that CF3.5 doesn't support the binary formatter. I'm using it to send objects over the network and now need to use something else to serialize my data... I heard about Google protocol buffers but found a version that has a bug under CF...
What serialization framework is good for CF?
Update: I forgot to mention, I need it for a commercial product... so GPL won't help
回答1:
There are two that I know of:
protobuf-net
OpenNxSerialization
I've had experience with both (though not on CF) and they are both very quick and easy to use. They both specify support for CF I believe.
回答2:
We use: CompactFormatterPlus + DotNetRemoting (Corrected)
I belive this also has a binary serializer in it: OpenNETCFIOSerial
Correction we actually use the CompactFormatterPlus. I do think that OpenNetCF also has a binary serializer as well. Our data that we sync can be up to 20 Meg in size per device.
回答3:
You can use db4o and configure it to use a MemoryBin as the backing storage and then send the bytes over the wire.
PS: the link points to Java documentation because db4o .Net documentation is in CHM format.
来源:https://stackoverflow.com/questions/3236960/binary-serialization-for-compact-framework-3-5