Commit Graph
86 Commits
Author SHA1 Message Date
Atsushi Eno 21cb4135ea fix bug #16744 - null values on nullable value types were not handled in deserializer. 2014-02-06 17:11:30 +09:00
Jonathan Pryor eda41be355 Support deserializing relative Uris. Fixes #15169.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=15169
2013-10-03 11:06:21 -04:00
Atsushi Eno 2d6335f6a7 revert default serialization: ignore non-public members. Also need to exclude backing field in non-default serialization. 2013-08-21 15:44:27 +09:00
Atsushi Eno 8a10b06610 Fix bug #13485: retrieve private fields and properties in serialization. 2013-08-05 15:36:24 +09:00
Martin Baulig efda0d4c62 Revert "Fixes make dist"
This reverts commit 87e95b46ed.

This puts DataContractJsonSerializerSettings.cs back into
mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json.

Let's please not have a single file from this namespace in another
directory, either move the entire System.Runtime.Serialization.Json
stuff into System.Runtime.Serialization or leave it here.
2013-03-15 18:14:44 -04:00
Marek Safar 87e95b46ed Fixes make dist 2013-03-14 17:42:45 +01:00
Martin Baulig 54f7c82d2b DataContractSerializer changes for .NET 4.5.
* Move System.Runtime.Serialization.Json from System.ServiceModel.Web.dll
  into System.Runtime.Serialization.dll on the mobile profile.

* Add DataContractJsonSerializerSettings and DataContractSerializerSettings..
2013-03-12 21:15:56 -04:00
Marek Safar 8063eb0963 Remove broken profile files 2013-02-12 10:19:10 +01:00
Rodrigo Kumpera de71901cf8 Kill the MOONLIGHT define in System.ServiceModel.Web. 2013-02-11 13:01:10 -05:00
Martin Baulig 2ff2fe25fa Support [OnSerializing] in System.Runtime.Serialization.Json.
This fixes a problem that has been reported on stackoverflow:
http://stackoverflow.com/questions/13362906/onserializing-method-not-called-in-mono-3-0-1
2012-11-13 23:04:26 +01:00
Sebastien Pouliot b5573f22de Parse floating point values with negative exponent correctly. Fix bug #4415 2012-04-13 19:19:13 -04:00
Marek Safar 4557955387 Fix JsonReaderWriterFactory parameters names 2012-03-28 11:26:07 +01:00
Marek Safar 2869713c48 Fix some compiler warnings 2012-02-17 12:37:25 +00:00
Jonathan Pryor e35e45293b [System.ServiceModel.Web] Support null as value for DateTime? field.
Fixes assistly #5863.
2012-01-04 16:35:02 -05:00
Miguel de Icaza 37b85d86ac Allow trailing commas on Json objects 2011-12-29 09:10:26 -05:00
Miguel de Icaza 88e2387665 Extend JsonSerializerReader to support nullables and parse a wider range of Date formats, fixes x#163 2011-11-24 01:29:27 -05:00
Andreia Gaita d8dc259299 [json] revert part of 382a385a8f, it regresses moon drt 983 2011-05-03 21:54:42 +01:00
Atsushi Eno 52da339835 Looks like .NET accepts non-integer numbers as int. Smells bogus though. 2011-04-06 22:02:58 +09:00
Atsushi Eno 01671273bb Fix build, looks like ArrayList is internally available in moon. 2011-04-05 23:05:43 +09:00
Atsushi Eno 382a385a8f Collection support in JSON serializer was actually for any IEnumerable. 2011-04-05 20:55:32 +09:00
Atsushi Eno 696ff71de2 Revert PushbackReader changes (was unnecessary and actually bogus). 2011-04-05 20:26:09 +09:00
Atsushi Eno 7a32f7a4a1 null value also outputs "type='null' in WCF JSON writer. 2011-04-05 19:47:54 +09:00
Atsushi Eno 5670f5b5ce Auto-detect text encoding from input stream for JsonReader. Fix DBCS pushback. 2011-04-05 18:22:56 +09:00
Atsushi Eno 3f0fe0dcde IDictionary`2 serialization support was missing in DataContractJsonSerializer.
Fixed bug #685042.
2011-04-05 13:19:54 +09:00
Sebastien Pouliot fc47bc9340 AppDomain.GetAssemblies() is available (it's internals) in Moonlight
* JsonSerializationReader.cs: Remove #if wrt MOONLIGHT since the API
is available (internal but Moonlight's mscorlib has an IVT on S.SM)
2011-04-04 08:24:25 -04:00
Atsushi Eno 60300f821d A bit less !NET_2_1 and !MOONLIGHT in Sys.ServiceModel.Web. 2011-04-02 04:10:09 +09:00
Atsushi Eno 7917753273 null JSON type must be handled in JsonWriter. 2011-03-26 21:27:19 +09:00
Atsushi Eno ea7e0d189a Do not always assume ascii == 1 byte in JsonWriter. Fix utf-16 usage. 2011-03-26 21:00:16 +09:00
Miguel de Icaza 4a7c594eb1 [System.Json] Fix loader.
The current loader failed with some Json strings due to the implementation
of the BufferedStreamReader.   Removed that implementation completely,
and instead depend on the StreamReader to do the actual BOM detection.

This removes the JavaScriptObjectDeserializer.cs file
2011-03-08 17:54:28 -05:00
Geoff Norton 7f2d20a0a8 Work around a full-aot issue for monotouch System.Json 2011-01-25 01:50:57 -05:00
Atsushi Eno 7a0f8f89a0 Fix bogus encoding detection in JavaScriptObjectDeserializer. 2011-01-21 12:09:42 +09:00
Andreia Gaita 5f78cb8870 [JsonWriter] Fix JsonWriter yet again. Behaviour of WriteRaw on .net and sl is
different, so ifdef to make everyone happy!
2010-10-29 16:03:57 +01:00
Atsushi Eno 5a406fd3a3 Fix JsonWriterTest.WriteRaw() regression. WriteRaw() is (looking) almost identical to WriteString() here. 2010-10-29 13:30:35 +09:00
Andreia Gaita 987ef9dbab [Json] Add support for calling external json (de)serialization methods
On Moonlight, ScriptObject types have custom (de)serialization methods that
need to be called whenever a user object includes properties of that type.
This patch creates a TypeMap subclass (ExternalTypeMap) and exposes a method
that can be called from moon's System.Windows.Browser to register custom
serialization and deserialization methods, keyed by type. These are called
whenever a property is found with a type (or base type) that has custom
methods registered.
2010-10-16 19:58:08 +01:00
Andreia Gaita ef2049a2b6 [Json] Fix decimal type serialization 2010-10-16 19:58:08 +01:00
Andreia Gaita 7cfce53c32 [Json] Fix uint type conversion when reading, should be mapped to long, not int 2010-09-30 21:03:12 +01:00
Rolf Bjarne Kvinge f7a0fde4c6 JsonSerializationWriter: handle char values 2010-09-24 12:11:36 +02:00
Andreia Gaita 778694e1b8 Add support for deserializing Char types
* JsonSerializationReader.cs: Add Char type to the switch. Reads the
  content as a string and validates its length
2010-07-27 20:12:02 +01:00
Andreia Gaita 4a6ea9c095 Add serialization support for generic IDictionary objects
* 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.
2010-07-27 20:08:15 +01:00
Atsushi Eno 3e59168e9d 2010-07-06 Atsushi Enomoto <[email protected]>
* 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
2010-07-06 13:41:08 +00:00
Atsushi Eno b79dda6c6d 2010-07-06 Atsushi Enomoto <[email protected]>
* JsonSerializationWriter.cs : it cannot serialize DateTime in
	  double, which causes crash in deserializer.


svn path=/trunk/mcs/; revision=159945
2010-07-06 09:21:34 +00:00
Atsushi Eno 6ce2b49f94 2010-07-06 Atsushi Enomoto <[email protected]>
* 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
2010-07-06 09:08:57 +00:00
Atsushi Eno 4efe543e9f 2010-07-06 Atsushi Enomoto <[email protected]>
* DataContractJsonSerializer_2_1.cs : add extra methods for
	  Sys.SM.Web.Extensions build.

	* WebMessageFormatter.cs : add NET_2_1 profile build.

	* AssemblyInfo.cs : InternalVisibleTo System.ServiceModel.Web.Extensions.


svn path=/trunk/mcs/; revision=159943
2010-07-06 08:59:28 +00:00
Atsushi Eno 13e5341363 2010-07-06 Atsushi Enomoto <[email protected]>
* JsonReader.cs : do not keep Attribute state once Read() is called.


svn path=/trunk/mcs/; revision=159942
2010-07-06 08:53:58 +00:00
Atsushi Eno 02c1565c69 2010-04-24 Atsushi Enomoto <[email protected]>
* JsonSerializationReader.cs : use List<T> if the contract
          member type is interface.


svn path=/trunk/mcs/; revision=156039
2010-04-24 07:11:05 +00:00
Jb Evain e1dc31d7ab use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153653
2010-03-16 10:53:59 +00:00
Kornél Pál 85ceae01fd JavaScriptReader.cs: Deserialize false correctly. Fixed bug #586712.
svn path=/trunk/mcs/; revision=153536
2010-03-13 09:48:25 +00:00
Atsushi Eno 6f0cd4a650 2010-03-10 Atsushi Enomoto <[email protected]>
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
2010-03-10 10:22:36 +00:00
Atsushi Eno 286c255027 2010-03-10 Atsushi Enomoto <[email protected]>
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
2010-03-10 10:17:24 +00:00
Atsushi Eno 2e11b2e4fa 2010-03-09 Atsushi Enomoto <[email protected]>
* JsonSerializationWriter.cs, JsonSerializationReader.cs,
	  JsonWriter.cs : Fix DateTime serialization and "\/" string escape
	  issues. Fixed bug #586169.

	* DataContractJsonSerializerTest.cs : add test for bug #586169.
	* JsonWriterTest.cs : add standalone write case for "\/".


svn path=/trunk/mcs/; revision=153318
2010-03-09 11:21:24 +00:00