How to create your own Serializer [modified]
-
Is there a way that i can create a Serializer Similiar to the XmlSerializer. the data that i am working with is kinda like a hash file. I would like to be able to stick some attributes to my objects/properties and serialize the hashed data to workable objects and back into formatted data. Could someone point me in the right direction? Thanks!
Don't be overcome by evil, but overcome evil with good
modified on Wednesday, December 26, 2007 10:51:03 AM
-
Is there a way that i can create a Serializer Similiar to the XmlSerializer. the data that i am working with is kinda like a hash file. I would like to be able to stick some attributes to my objects/properties and serialize the hashed data to workable objects and back into formatted data. Could someone point me in the right direction? Thanks!
Don't be overcome by evil, but overcome evil with good
modified on Wednesday, December 26, 2007 10:51:03 AM
You can implement the ISerializable interface on your class and handle the serialization events
only two letters away from being an asset
-
You can implement the ISerializable interface on your class and handle the serialization events
only two letters away from being an asset
Hey Mark, Thanks for your reply. Looking at the ISerializable i don't think i am able to use this. The kind of data that i am working with is a pipe delemited file (ex Adam|1550 Robin St. Tampa, FL). What i'd like to do is take this string and add it to a "Customer Object" so i can just manipulate the data using the properties. Then when i am done w/ i'll then be able to serialize it in the original format. ISerializable Interface uses the SerializtionInfo which gets/adds data by keys and i can't store the keys in this data.
Don't be overcome by evil, but overcome evil with good
-
Hey Mark, Thanks for your reply. Looking at the ISerializable i don't think i am able to use this. The kind of data that i am working with is a pipe delemited file (ex Adam|1550 Robin St. Tampa, FL). What i'd like to do is take this string and add it to a "Customer Object" so i can just manipulate the data using the properties. Then when i am done w/ i'll then be able to serialize it in the original format. ISerializable Interface uses the SerializtionInfo which gets/adds data by keys and i can't store the keys in this data.
Don't be overcome by evil, but overcome evil with good
Unless I'm missing something you're not saying. The file is already the serialized representation of your objects.
only two letters away from being an asset
-
Unless I'm missing something you're not saying. The file is already the serialized representation of your objects.
only two letters away from being an asset