The current loader failed with some Json strings due to the implementation
of the BufferedStreamReader. Removed that implementation completely,
and instead depend on the StreamReader to do the actual BOM detection.
This removes the JavaScriptObjectDeserializer.cs file
On Moonlight, ScriptObject types have custom (de)serialization methods that
need to be called whenever a user object includes properties of that type.
This patch creates a TypeMap subclass (ExternalTypeMap) and exposes a method
that can be called from moon's System.Windows.Browser to register custom
serialization and deserialization methods, keyed by type. These are called
whenever a property is found with a type (or base type) that has custom
methods registered.
* JsonSerializationReader.cs, JsonSerializationWriter.cs:
Add a special case for IDictionary, since KeyValuePair objects
have private setters and can't be processed via the normal
object code path.
* TypeMap.cs :
Do not try to add static members as serialization targets.
Support OnDeserializing and OnDeserialized. Fixed bug #615800.
* DataContractJsonSerializerTest.cs : add test for bug #615800.
svn path=/trunk/mcs/; revision=159958
* TypeMap.cs : when an object is null, return null, not just an
uninitialized object.
* DataContractJsonSerializerTest.cs : add test for bug #615801.
svn path=/trunk/mcs/; revision=159944
in System.ServiceModel.Web:
* JavaScriptReader.cs : moved from Sys.Json/JsonReader.cs.
* net_2_0_System.ServiceModel.Web.dll.sources,
net_2_1_raw_System.ServiceModel.Web.dll.sources :
move JsonReader.cs as Sys.R.S.Json/JavaScriptReader.cs
in System.Json:
* JsonReader.cs : moved to Sys.SM.Web/Sys.R.S.Json.
* System.Json.dll.sources : remove JsonReader.cs.
svn path=/trunk/mcs/; revision=153393
in System.ServiceModel.Web:
* JavaScriptObjectDeserializer.cs : new internal file, which is
used by System.Json (for moonlight compatibility).
* net_2_0_System.ServiceModel.Web.dll.sources,
net_2_1_raw_System.ServiceModel.Web.dll.sources :
add JavaScriptObjectDeserializer.cs and JsonReader in Sys.Json
(which is to be moved later).
* AssemblyInfo.cs: added InternalVisibleTo(System.Json). Also added
dummy 2.0 for easy testing.
in System.Json:
* JsonValue.cs : use Sys.SM.Web.dll's JavaScriptObjectDeserializer
for silverlight sdk / moonlight compatibility.
* JsonReader.cs : renamed to JavaScriptReader (for disambiguation in
Sys.SM.Web.dll). Now it is native-type based and used by the above
deserializer.
* Makefile : reference System.Xml and System.ServiceModel.Web (for
moonlight compatibility).
* AssemblyInfo.cs : use the same pub key in 2.0 (dummy), to ease
testing locally.
svn path=/trunk/mcs/; revision=153392
* DataContractJsonSerializer.cs : KnownTypes does not include root
type. Fixed bug #573689.
* DataContractJsonSerializerTest.cs :
enable TypeIsNotPartsOfKnownTypes(), and add more related tests.
svn path=/trunk/mcs/; revision=150279
* JsonSerializationReader.cs : "null" for string should be read as
null, not String.Empty. Fixed bug #573690.
* DataContractJsonSerializerTest.cs : null-string case is working.
svn path=/trunk/mcs/; revision=150276
* DataContractJsonSerializer_2_1.cs: Don't hide [Field|Method]
AccessException inside a SerializationException but in a
SecurityException.
svn path=/trunk/mcs/; revision=150219
* DataContractJsonSerializer_2_1.cs: New. Simpler version for
Moonlight since it does not inherit from the same base type nor
does it overrides any base methods.
svn path=/trunk/mcs/; revision=150149
* TypeMap.cs : handle [Serializable] objects such as KeyValuePair<,>
like we do in 2.0. Removed previous workarounds. (Do not serialize
and deserialize nonpublic members in "default" mappings.)
svn path=/trunk/mcs/; revision=148364
2009-12-11 Chris Toshok <[email protected]>
* TypeMap.cs (CreateDefaultTypeMap): only include non-public
property info when dealing with KeyValuePair<,>. This is *not*
the way MS handles it, but we emulate things much better with this
hack.
in test/System.Runtime.Serialization.Json/:
2009-12-11 Chris Toshok <[email protected]>
* DataContractJsonSerializerTest.cs: add a test case for
non-public properties.
svn path=/trunk/mcs/; revision=148184