Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A nullable value that is set is serialized with a casting prefix, which seems redundant. #32

Closed
GoogleCodeExporter opened this issue May 19, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1.
Serialize some nullable value that is of type "System.Guid?" or 
"Nullable<System.Guid>".

What is the expected output? What do you see instead?

Expected:
"Id":"5b23029c-3a59-454b-8bf0-7ce3dcec1f3c"

Instead:
"Id":(System.Guid)"5b23029c-3a59-454b-8bf0-7ce3dcec1f3c"

What version of the product are you using? 
2.1.1.144

On what operating system?
Vista 32bit

Please provide any additional information below.

When types are serialized using jsonexlib, I don't like to see any type 
information that is redundant in the output.

Probably a custom type converter must be introduced for Nullables?


Original issue reported on code.google.com by paramatrix@gmail.com on 12 Nov 2008 at 9:12

@GoogleCodeExporter
Copy link
Author

It appears that when calling GetType() off of an instance of Nullable<Guid> it 
returns Guid.  May need some special handling so that Nullable types are 
considered 
equal to their regular types and no type info is written.

Original comment by elliott....@gmail.com on 15 Nov 2008 at 4:19

  • Changed state: Accepted
  • Added labels: Type-Enhancement

@GoogleCodeExporter
Copy link
Author

Original comment by elliott....@gmail.com on 16 Nov 2008 at 5:47

  • Added labels: Milestone-Release3.0, Priority-Low, Type-Defect
  • Removed labels: Type-Enhancement

@GoogleCodeExporter
Copy link
Author

Tests for equality now use a helper method which equates a nullable type with 
its 
base type.

Original comment by elliott....@gmail.com on 25 Jan 2009 at 4:44

  • Changed state: Coded

@GoogleCodeExporter
Copy link
Author

3.0 Release

Original comment by elliott....@gmail.com on 26 Jan 2009 at 2:22

  • Changed state: Verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant