-Fixed error when deserializing nullable types with no content

-Changed JsonReaders to set TokenType to JsonToken.None after finishing content
-Changed the ReadAsXXX methods to return null instead of throwing an error when there is no content
This commit is contained in:
James Newton-King
2012-02-19 01:25:47 +13:00
parent c876e1d9cc
commit 4f8832adc0
11 changed files with 240 additions and 26 deletions
@@ -504,6 +504,9 @@ namespace Newtonsoft.Json
case JsonToken.Bytes:
// these have no equivalent in JSON schema
break;
case JsonToken.None:
// no content, do nothing
break;
default:
throw new ArgumentOutOfRangeException();
}