Created
February 2, 2018 21:17
-
-
Save Scooletz/272a87bc3f948b3041e49409d78125ee to your computer and use it in GitHub Desktop.
JSON.NET serializers Guid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void WriteValue(Guid value) | |
{ | |
InternalWriteValue(JsonToken.String); | |
string text = null; | |
#if HAVE_CHAR_TO_STRING_WITH_CULTURE | |
text = value.ToString("D", CultureInfo.InvariantCulture); | |
#else | |
text = value.ToString("D"); | |
#endif | |
_writer.Write(_quoteChar); | |
_writer.Write(text); | |
_writer.Write(_quoteChar); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment