Issue: The previous code, with new tests [1], failed when the linker was
enabled.
That was caused because the code looks for the Keys and Item properties
getter using reflection. The linker handled that imperfectly (it left
some holes), in part because:
* System.Collections.Generic.IDictionary`2 does not implement
System.Collections.IDictionary; and
* It preserved the explicit methods - not the implicit one that were
used the the reflection-based code;
That later fact is also a bug (without the linker involvment) and solved
by this commit. A unit test was added to show the issue (NRE).
The patch also avoid the use of reflection for IDictionary since we can
simply typecast to get the same result (without the additional cost).
* 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
* 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
* DataContractJsonSerializerTest.cs : make some tests narrow down
possible cause of errors to detect expected errors more precisely.
svn path=/trunk/mcs/; revision=150278
* 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
* DataContractJsonSerializerTest.cs: Add non-working test cases
for null-string, known types and handling floating point special
values
svn path=/trunk/mcs/; revision=150151
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
* JsonReader.cs : e- and e+ was resulting in wrong parse error.
This should fix part of bug #531904.
* JsonReaderTest.cs : another number parse case.
svn path=/trunk/mcs/; revision=148099
* DataContractJsonSerializer.cs, JsonReader.cs : Silverlight uses
LAME parser that allows object member name as *raw* string
without double-quotes. (This also reverts the previous change.)
* DataContractJsonSerializerTest.cs : added ignored test case that
verifies 2.1 behavior (with another case that justifies removal
of the previous hack).
svn path=/trunk/mcs/; revision=146599
* DataContractJsonSerializer.cs, JsonSerializationWriter.cs:
alwaysEmitTypeInformation is false by default. It is for __type
attribute, not for type attribute. __type name is always with ":#".
* TypeMap.cs : sort members in default typemap (it is ordered).
Uncomment EmitDefaultValue.
* JsonWriter.cs : handle "null" string (it is somewhat messy).
* WebMessageEncoder.cs : use alwaysEmitTypeInformation to output
object __type.
* DataContractJsonSerializerTest.cs : added test for
alwaysEmitTypeInformation argument.
svn path=/trunk/mcs/; revision=143748
* TypeMap.cs : allow get-only collections. Note that they are not
always deserializable (in .NET either).
* DataContractJsonSerializerTest.cs : fixed some tests to match
.NET RTM behavior. Added read-only collection case, (but [Ignore]d).
svn path=/trunk/mcs/; revision=125332
* TypeMap.cs : DataContractJsonSerializer in RTM does not seem to
reject contract-less types. So populate map for public members.
* DataContractJsonSerializer.cs : close XmlWriter to flush stream
(and it closes the stream by default).
* DataContractJsonSerializerTest.cs : added test for contract-less
serialization.
* Makefile : add -d:NET_3_5.
svn path=/trunk/mcs/; revision=125328