Skip to content

Serializing and deserializing in different frameworks #1378

Description

@Schwenkner

I'm not sure, if this is a bug or just not implemented.

Having a class with a property of type "Type", once in a .Net framework and once in a UWP framework.
The type serializes with the AssemblyQualifiedName property of the type.

Thus serializing in the .Net framework rusults in something like
"System.EventArgs, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

If I deserialize this in an UWP application with JsonConver.DeserializeObject a propper Type object is created. Serializing this one in UWP, the following string is produced
"System.EventArgs, System.Private.CoreLib, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 7cec85d7bea7798e"

Trying to deserialize this back in a .Net framework application, I get the error
"Error converting value "System.EventArgs, System.Private.CoreLib, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 7cec85d7bea7798e" to type 'System.Type'."

The message is clear to me, but then I wouldn't expect why it works in the other direction. Is this due to tha fact, the UWP version is newer and can handle this convertion or is it a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions