This project is read-only.

I don't want to use files but strings instead

Aug 9, 2011 at 11:09 AM

First of all, thank you very much for this great library.

I would like to know if there is a way to retreive the serialized xml and not save it to a file, and a way to pass this serialized xml as a string and not a file to the Deserialize method and retreive the original object.


Aug 9, 2011 at 9:38 PM

hi bahith, no, it's not planned to extend sharpserializer with serializing to/from a string. all you need to do is serializing to a MemoryStream which is wrapped in a BinaryReader. Then you get the xml as a text. Apart from I cannot override a Serialize/Deserialize method with a string parameter. They have already one - it's a filename and it serializes to a file.

Aug 10, 2011 at 8:17 AM

Thank you very much polo, I will try serializing the object to a MemoryStream and I hope that I can desiralize it from a MemoryStream also.