-Fixed deserializing a null string throwing a NullReferenceException

-Fixed JsonTextReader reading from a slow stream
-Fixed CultureInfo not being overridden on JsonSerializerProxy
-Fixed full trust security check in .NET 2.0 & .NET 3.5
-Improved writing JSON with indent performance
This commit is contained in:
James Newton-King
2012-03-31 14:30:14 +13:00
parent 8471c4ffe1
commit a032f4bbf3
12 changed files with 300 additions and 178 deletions
@@ -117,7 +117,7 @@ namespace Newtonsoft.Json.Serialization
if (reader.TokenType == JsonToken.None && !ReadForType(reader, contract, converter != null, false))
{
if (!contract.IsNullable)
if (contract != null && !contract.IsNullable)
throw new JsonSerializationException("No JSON content found and type '{0}' is not nullable.".FormatWith(CultureInfo.InvariantCulture, contract.UnderlyingType));
return null;