Don't append .0 to NaN floats when serializing JSON

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3582 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
Latif Khalifa
2011-09-10 11:20:58 +00:00
parent 984aacaab4
commit e294702a0b

View File

@@ -326,7 +326,8 @@ namespace LitJson
Put (str);
if (str.IndexOf ('.') == -1 &&
str.IndexOf ('E') == -1)
str.IndexOf ('E') == -1 &&
!double.IsNaN(number))
writer.Write (".0");
context.ExpectingValue = false;