+2010-01-27 Atsushi Enomoto <atsushi@ximian.com>
+
+ * JsonSerializationReader.cs : oops, wrong fix, should consume the
+ reader.
+
2010-01-27 Atsushi Enomoto <atsushi@ximian.com>
* JsonSerializationReader.cs : "null" for string should be read as
throw new SerializationException (String.Format ("The only expected DBNull value string is '{{}}'. Tha actual input was '{0}'.", dbn));
return DBNull.Value;
case TypeCode.String:
- return isNull ? null : reader.ReadElementContentAsString ();
+ if (isNull) {
+ reader.ReadElementContentAsString ();
+ return null;
+ }
+ else
+ return reader.ReadElementContentAsString ();
case TypeCode.Single:
return reader.ReadElementContentAsFloat ();
case TypeCode.Double:
if (type == typeof (Guid)) {
return new Guid (reader.ReadElementContentAsString ());
} else if (type == typeof (Uri)) {
- return isNull ? null : new Uri (reader.ReadElementContentAsString ());
+ if (isNull) {
+ reader.ReadElementContentAsString ();
+ return null;
+ }
+ else
+ return new Uri (reader.ReadElementContentAsString ());
} else if (type == typeof (XmlQualifiedName)) {
string s = reader.ReadElementContentAsString ();
int idx = s.IndexOf (':');