in class/corlib/System.Collections.Generic/:
commit87186868052b9d0386554b57f7774d3c82780c4c
authorChris Toshok <toshok@novell.com>
Mon, 7 Dec 2009 07:39:17 +0000 (7 07:39 -0000)
committerChris Toshok <toshok@novell.com>
Mon, 7 Dec 2009 07:39:17 +0000 (7 07:39 -0000)
tree78ba298d74eedee969a19d8ac074edb36b44b19a
parent784b4095966923346e74ad3b02ad26d1116a1a69
in class/corlib/System.Collections.Generic/:
2009-12-06  Chris Toshok  <toshok@ximian.com>

* KeyValuePair.cs: we need setters for Key and Value so they can
be set via reflection from
System.ServiceModel.System.Runtime.Serialization.Json.TypeMap.cs.

in class/System.ServiceModel.Web/System.Runtime.Serialization.Json/:
2009-12-06  Chris Toshok  <toshok@ximian.com>

* JsonSerializationReader.cs (DeserializeGenericCollection): this
is jb's (iirc) patch, actually.  Types subclassing from
ICollection<T> need to be supported, and since it's an interface
the implementation might be explicit.  So instead of groveling
around in the actual type, we need to dispatch through the
interface's method.

* TypeMap.cs (CreateDefaultTypeMap): we need to include non-public
properties, since KeyValuePair items must be able to write to Key
and Value properties.

* JsonReader.cs (ReadContent): for builtin values (null, true,
false), use TryReadString instead of individual ReadChar's, since
they aren't reversible if the string didn't match.  In the default
case, if we're LameSilverlightLiseralParser, we need to push back
the current character onto the stream -- this is because for
netflix's AppConfig.json we were parsing "frameRatePolicy" as
"rameRatePolicy" (the 'f' was triggering the "false" parsing).
(class PushBackReader): add this class to unify all the pushing
back of characters we need to do.  1 character (JsonReader's old
"saved_char") isn't enough given that you could have a property
named, e.g., "falsifiable", and we'd need 4 characters worth of
pushback to recognize that correctly.

svn path=/trunk/mcs/; revision=147766
mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/ChangeLog
mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonReader.cs
mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonSerializationReader.cs
mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs
mcs/class/corlib/System.Collections.Generic/ChangeLog
mcs/class/corlib/System.Collections.Generic/KeyValuePair.cs