This project has moved. For the latest updates, please go here.

Struct / Structure Bug?

Jan 19, 2010 at 1:49 AM is able to serialize my class that contains a structure (struct in C#).

An attempt to deserialize the resulting text fails, however.

Is this a known issue? I could not find any reference to this as an issue.

Jan 19, 2010 at 5:03 AM

I would expect it to work. If you can give the struct code, JSON and the execption details I can look to see what is going wrong.

Jan 19, 2010 at 5:58 PM
Edited Jan 21, 2010 at 3:27 AM

The problem may be in my own code.
I will test and post an update.

Jan 20, 2010 at 4:27 AM
Edited Jan 21, 2010 at 3:28 AM

OK, it was my own danged fault. Background is as follows:

I do not like using "type.AssemblyQualifiedName" to represent object type in serialized text (in JsonSerializerInternalWriter.cs).

It results in long, ugly text and, since I am exchanging serialized data with another language (not .Net), assembly information is meaningless.

Unfortunately, I was a little overzealous and used "type.Name". This ends up losing needed information, however.

I switched to "type.Fullname" and this does the trick.

In my view, this should be the default setting.

It would be nice if this was brought out as a property!