Commit Graph
17 Commits
Author SHA1 Message Date
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 b9c7ab7bc0 2008-09-20 Marek Habersack <[email protected]>
* JsonDeserializer.cs: added support for stand-alone NaN, Infinity
	and -Infinity values, as well as the same within an array.

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

	* JavaScriptSerializerTest.cs: added some tests

svn path=/trunk/mcs/; revision=113596
2008-09-19 22:41:46 +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 128130fb6c 2008-08-22 Marek Habersack <[email protected]>
* JsonSerializer.cs: do not perform deep object serialization - it
	results in all kinds of problems (including too big size of the
	resulting string, recursion errors when two or more objects in the
	hierarchy hold a reference to some object) and is not what .NET
	code does. 
	Property name is written only after it is determined if we're
	serializing the property or not.
	Entire object is serialized only if it's the object requested for
	serialization by calling code.

2008-08-22  Marek Habersack  <[email protected]>

	* Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs:
	marked several of the JavaScriptSerializer tests as not
	working. Experiments show that the tests are invalid as they relay
	on behavior which is different to .NET's.

	* System.Web.Script.Serialization/JavaScriptSerializer.cs:
	GetConverter now checks whether the requested type is descendant
	from the type supported by teh converter.

svn path=/trunk/mcs/; revision=111421
2008-08-22 20:51:45 +00:00
Igor Zelmanovich 5fdfd632f7 port test suite to TARGET_JVM
svn path=/branches/mainsoft/gh2.2/mcs/; revision=98600
2008-03-19 15:00:47 +00:00
Konstantin Triger a344135835 convert ArrayList to array only in case of DeserializeObject()
svn path=/trunk/mcs/; revision=92838
2008-01-14 10:27:15 +00:00
Igor Zelmanovich 789cb3b5d5 fixed test
svn path=/trunk/mcs/; revision=92051
2007-12-31 09:13:27 +00:00
Adar Wesley 56dd3d066a Added support for TypeResolver to JavaScriptSerializer.
Added relevant tests.

svn path=/trunk/mcs/; revision=85395
2007-09-06 09:32:54 +00:00
Konstantin Triger 3a12a9c2e9 fix enum serialization
svn path=/trunk/mcs/; revision=83075
2007-07-31 13:58:58 +00:00
Adar Wesley 99aa850634 Implemented support for JavaScriptSerializer.MaxJsonLength and
JavaScriptSerializer.RecursionLimit.

svn path=/trunk/mcs/; revision=83000
2007-07-30 15:37:50 +00:00
Konstantin Triger 3baf413bb9 fixing DateTime serialization
svn path=/trunk/mcs/; revision=82988
2007-07-30 15:01:31 +00:00
Konstantin Triger fe410f7cc1 initial implementation for JavaScriptSerializer.MaxJsonLength, JavaScriptSerializer.RecursionLimit
svn path=/trunk/mcs/; revision=82757
2007-07-26 12:27:54 +00:00
Igor Zelmanovich 0fbd8e2b37 JavaScriptSerializer.Deserialize method returns correct type object.
javascripts array is deserialized into object[] type.

svn path=/trunk/mcs/; revision=81321
2007-07-04 07:49:55 +00:00
Konstantin Triger fe62ab9fb5 correctly handle string escaping
svn path=/trunk/mcs/; revision=80971
2007-06-28 13:35:13 +00:00
Konstantin Triger d828cfe73c implement a CultureInfoConverter for testing
svn path=/trunk/mcs/; revision=80487
2007-06-21 15:52:56 +00:00
Konstantin Triger db56e73b59 implementation of converters for serialization
svn path=/trunk/mcs/; revision=80486
2007-06-21 15:30:02 +00:00
Konstantin Triger 57980ee7b4 add tests for JSON serializer
svn path=/trunk/mcs/; revision=79280
2007-06-12 14:50:59 +00:00