I have a series of F# data structures which I cannot control (computation expressions and lambdas, which are compiler-generated) and which I must serialize.
The binary serializer works, but unfortunately it is not available for the XBox and the .Net CF. Is there some alternative that does not require me to redesign a year worth of pure and immutable data structures?
Thanks
I’ve used the nserializer open source library successfully for a similar situation – namely serializing arbitrary .Net objects used to implement game AI in F#, including Unity style “coroutines” implemented via yields in sequences (which are internally compiled to a number of classes roughly representing the possible continuations).
It should do what you want, although it uses XML rather than a binary format – considering compressing and decompressing if the size turns out to be an issue.