* JsonSerializationReader.cs: Add Char type to the switch. Reads the
content as a string and validates its length
+2010-07-27 Andreia Gaita <avidigal@novell.com>
+
+ * JsonSerializationReader.cs: Add Char type to the switch. Reads the
+ content as a string and validates its length
+
2010-07-27 Andreia Gaita <avidigal@novell.com>
* JsonSerializationReader.cs, JsonSerializationWriter.cs:
}
else
return reader.ReadElementContentAsString ();
+ case TypeCode.Char:
+ var c = reader.ReadElementContentAsString ();
+ if (c.Length > 1)
+ throw new XmlException ("Invalid JSON char");
+ return Char.Parse(c);
case TypeCode.Single:
return reader.ReadElementContentAsFloat ();
case TypeCode.Double: