* JsonDeserializer.cs: unquoted key values must ignore leading
and trailing whitespace
2009-03-06 Marek Habersack <[email protected]>
* JavaScriptSerializerTest.cs: added a test for unquoted tests
surrounded with spaces.
svn path=/trunk/mcs/; revision=128801
* JsonSerializer.cs: StringBuilder extension methods aren't used
anymore, changed to calls to static methods in
StringBuilderExtensions.
* StringBuilderExtensions.cs: cannot use extension methods here
because this file is also used in the version 1.0 build which
doesn't reference System.Core
svn path=/trunk/mcs/; revision=120823
* JsonDeserializer.cs: object can contain more than one unquoted
keys.
2008-10-22 Marek Habersack <[email protected]>
* JavaScriptSerializerTest.cs: added tests for deserialization of
objects with more than one unquoted key names.
svn path=/trunk/mcs/; revision=116713
* LogicalTypeInfo.cs: do not use
LazyDictionary as enum serializer anymore.
* ProfileService.cs: do not use
LazyDictionary as ProfileService serializer anymore.
* RestHandler.cs: do not use
LazyDictionary as the Exception or NameValueCollection serializer
anymore.
2008-09-23 Marek Habersack <[email protected]>
* JavaScriptSerializer.cs: removed the LazyDictionary class, it's
not needed anymore.
svn path=/trunk/mcs/; revision=113832
* 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
* 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
* 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
* 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
* System.Web.Script.Serialization/JavaScriptSerializer.cs: if the
target type is an IDictionary with value type of System.Object,
make sure to NOT convert any values.
Any values descendant from JavaScriptSerializer.LazyDictionary are
converted to Dictionary <string, object>
svn path=/trunk/mcs/; revision=111956
* System.Web.Script.Services/LogicalTypeInfo.cs: Invoke does not
convert context to System.Object.
If context is descendant from JavaScriptSerializer.LazyDictionary
it is converted to a regular Dictionary <string, object> before
passing to the service method.
2008-08-28 Marek Habersack <[email protected]>
* JsonSerializer.cs: each value stored in an enumerable is treated
as a top-level object.
svn path=/trunk/mcs/; revision=111801
* System.Web.Script.Serialization/JavaScriptSerializer.cs:
correctly handle members which have an interface as their return
type - several known interfaces are converted to implementing
types.
svn path=/trunk/mcs/; revision=111772
* 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
* JsonSerializer.cs: implemented a work-around for a bug in the
SerializedLazyDictionary which would fail to serialize a type if
any of its properties would throw an exception.
svn path=/trunk/mcs/; revision=110984
*.cs: all files from JSon.NET are now re-licensed under the
MIT/X11 license, thanks to his author James Newton-King
for relicensing them.
svn path=/trunk/mcs/; revision=103523