Commit Graph
4 Commits
Author SHA1 Message Date
Marek Habersack 9844a237ea Backport of r120823.
svn path=/branches/mono-2-2/mcs/; revision=120825
2008-12-05 12:01:37 +00:00
Juraj Skripsky 0594b0199e 2008-09-23 Juraj Skripsky <[email protected]>
* JsonSerializer.cs: "SerializeGenericDictionary" is an instance method,
	fix retrieval of its MethodInfo.
	Initialize serializeGenericDictionaryMethods (lazily).
	Add and use GetClosedIDictionaryBase to also handle cases where a
	non-generic class implements a closed IDictionary<,> (e.g.
	SomeDictionary : IDictionary<string, object>). Fixes bug #424704.
	First check for IDictionary<,>, then for IDictionary.

2008-09-20  Juraj Skripsky  <[email protected]>

	* JavaScriptSerializerTest.cs: added test for bug #424704.


svn path=/trunk/mcs/; revision=113829
2008-09-23 14:33:54 +00:00
Marek Habersack 93a1d2ad6c 2008-09-19 Marek Habersack <[email protected]>
* Json.cs: added new Serialize overload which takes a TextWriter
	for its output parameter.
	Added Deserialize methods.

	* JsonSerializer.cs: made InitialJavaScriptDateTicks internal.
	Added new Serialize overload which takes a TextWriter for its
	output parameter.
	Added WriteValue overloads for float and double - they must not be
	converted to strings as IConvertibles because their Max/MinValue
	end up converted incorrectly.

	* JavaScriptSerializer.cs: adjustments for the new JSON
	(de)serializer.

	* JsonDeserializer.cs: new JSON deserializer code, fully compliant
	with the .NET AJAX one.

2008-09-19  Marek Habersack  <[email protected]>

	* JavaScriptSerializerTest.cs: enabled some tests which were
	failing with the old (de)serializer, but work with the new one.

2008-09-19  Marek Habersack  <[email protected]>

	* System.Web.Extensions.dll.sources: removed most of the
	Newtonsoft JSON code, leaving only ReflectionUtils and
	JavaScriptUtils.


svn path=/trunk/mcs/; revision=113590
2008-09-19 21:13:55 +00:00
Marek Habersack 5defc3fa29 2008-09-17 Marek Habersack <[email protected]>
* System.Web.Extensions.dll.sources: added
	System.Web.Script.Serialization/Json.cs,
	System.Web.Script.Serialization/JsonSerializer.cs and
	System.Web.Script.Serialization/StringBuilderExtensions.cs

	* System.Web.Script.Serialization/Json.cs: helper class to invoke
	de/serializer.

	* System.Web.Script.Serialization/JsonSerializer.cs: new
	implementation of Json serializer that is free of issues found in
	the old one (and faster + simpler).

	* System.Web.Script.Serialization/JavaScriptSerializer.cs: staging
	transition to the new Json (de)serializer. For now deserialization
	is done using the old JSON code, serialization uses the new
	serializer.

	* System.Web.Script.Serialization/StringBuilderExtensions.cs: a
	set of simple StringBuilder extension methods which check the size
	of the builder against some value and throw an exception if the
	value is exceeded.

svn path=/trunk/mcs/; revision=113254
2008-09-17 06:42:10 +00:00