This project is read-only.

Why typeof(Type) is not SimpleProperty?

Jul 13, 2011 at 11: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 !

Jul 28, 2011 at 4:53 PM
Edited Aug 14, 2011 at 12:34 PM

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:

thanks for your feedback!