* 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
* 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
* JsonSerializationReader.cs (DeserializeGenericCollection): in
the 2.1 case we still need to convert the List<> to an array.
svn path=/trunk/mcs/; revision=147835
2009-12-07 Chris Toshok <[email protected]>
* JsonReaderWriterFactory.cs (CreateJsonReader): pass null for the
encoding parameter instead of calling Detect. The jsonreader's
PushbackReader will autodetect.
(Detect): remove. a BufferedStream created from an unseekable
stream is itself unseekable, which makes it just as useless. This
breaks netflix's isostore file parsing.
* JsonReader.cs (PushbackReader): add a ctor which doesn't take an
encoding, for the autodetecting reader case. for this ctor, pass
true to StreamReader's ctor for detectEncodingFromByteOrderMarks.
svn path=/trunk/mcs/; revision=147829
2009-12-06 Chris Toshok <[email protected]>
* 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 <[email protected]>
* 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
* 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
* JsonSerializationWriter.cs : output "type" attribute on bool
values too.
* JsonSerializationReader.cs : type loading attempt was insufficient
and hence often missed indicated types to deserialize.
svn path=/trunk/mcs/; revision=142423
* TypeMap.cs: Avoid checking the getter/setter information until after
checking if we have the required attribute decorated.
svn path=/trunk/mcs/; revision=129232
2009-03-02 Chris Toshok <[email protected]>
* XmlBinaryDictionaryReader.cs, XmlSimpleDictionaryReader.cs: 2.1
has HasValue.
In System.XML/System.Xml:
2009-03-02 Chris Toshok <[email protected]>
* XmlReader.cs, XmlTextReader.cs, XmlTextReader2.cs,
EntityResolvingXmlReader.cs: 2.1 has HasValue.
In System.XML/Mono.Xml:
2009-03-02 Chris Toshok <[email protected]>
* SubtreeXmlReader.cs, XmlFilterReader.cs: 2.1 has HasValue.
In System.Xml.Linq/System.Xml.Linq:
2009-03-02 Chris Toshok <[email protected]>
* XNodeReader.cs: 2.1 has HasValue.
In System.ServiceModel.Web/System.Runtime.Serialization.Json:
2009-03-02 Chris Toshok <[email protected]>
* JsonReader.cs: 2.1 has HasValue.
svn path=/trunk/mcs/; revision=128406
* 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