none
Example of binary serialization to file?

    General discussion

  • I am porting a Windows Form app to a Windows 8 Store app.

    The BinaryFormatter class was used in the previous app. but this class is not supported in Windows 8. The object graph we need to serialize (and deserialize), then read/write to a file, has a mix of strings and binary data. I would strongly prefer using a "proper binary" serialization method over any sort of XML/Soap method. By other words, I would prefer write/read real binary data to the file, not text (Xml) data.

    Thanks in advance for any tips..

    Friday, November 23, 2012 3:54 PM

All replies

  • Yes, that BinaryFormatter Class cannot be used in Windows Store app.

    Maybe you can try serialization it as XML first, and then using steam reading and writer to convert it with Binary.

    Or you need to customer the serialization.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, November 28, 2012 12:03 PM
    Moderator
  • Thanks Jesse,

    Yes, I actually ended up with that. XML serialization followed by stream reading/writing. Don't have time for custom so it has to be as good as is gets right now. 

    Wednesday, November 28, 2012 2:05 PM