This project has moved and is read-only. For the latest updates, please go here.


Handling empty GUIDs with JSON.NET


when parsing objects with properties type of GUID on the CLR object and GUIDs are empty or null I get parser exceptions:
"{"id":"","name":"Test"}" results in "Unrecognized Guid format."
"{"id":null,"name":"Test"}" results in "Value cannot be null."
"{"id":"00000000-0000-0000-0000-000000000000","name":"Test"}" works, but I don't want to force clients to provide this.
It would be great if empty / null value GUIDs wouldn't throw an exception.
A possible solution has been posted here:
Closed Apr 19, 2012 at 10:56 AM by JamesNK


JamesNK wrote Apr 12, 2012 at 11:49 PM

Do the first two work with nullable Guid properties?

wrote Apr 19, 2012 at 10:56 AM

wrote Feb 22, 2013 at 2:48 AM

wrote May 16, 2013 at 1:37 PM