Why typeof(Type) is not SimpleProperty?

Jul 13, 2011 at 10:59 AM

First sorry for my poor English.

I have a problem in serializing/deserializing properties that the type of the property is System.Type.

It seems like random serialize it to actual type, RuntimeType or something with "id" attribute. for sure It cannot deserialize, and throw some Exceptions.

 

I found the "TypeInfo" make a decision of a type is Simple or Complex, why couldnt you make it more extensible like PropertyProvider or SimpleValueConverter ,so that I could let Type be a SimpleProperty and use my own SimpleValueConverter to serialize it ? And I also think you should make use of TypeDescriptor, some type like Font It cannot simple serialize/deserialize correctly.

I know I could write my own PropertySerializer to handle these problems, but why I am not able to use your XmlProperySerializer and extend it to make my life more easier ?

 

thanks for your great work on this amazing library !

Coordinator
Jul 28, 2011 at 3:53 PM
Edited Aug 14, 2011 at 11:34 AM

hi booolean, since SharpSerializer 2.11 is serialization of System.Type as a simple property supported. I'm working now on custom subserializers which can serialize any type in any way.

there is an article on the code project telling, how to serialize weird types:

http://www.codeproject.com/KB/windows-phone-7/sharpserializer_serialize.aspx

thanks for your feedback!