Commit Graph
89 Commits
Author SHA1 Message Date
Alexis Christoforides fbea921536 [tests] Add tests for Bug #23058 and polymorphism/known types in DataContractJsonSerializer. 2014-10-07 16:24:41 -07:00
Marek Safar 410af9c0cc Merge pull request #1309 from esdrubal/json
Improved Json deserialization of floating-point numbers.
2014-09-25 07:42:36 -09:00
Marcos Henrich ee71f0a1e6 Test Json deserialization of a floating-point number as object.
Covers 21583.
2014-09-25 15:15:38 +01:00
Marcos Henrich 5ddcc07c67 Test Rss20ItemFormatter.ReadFrom Guid. Covers 23262. 2014-09-25 13:36:40 +01:00
Alexander Köplinger f396d37c54 [System.ServiceModel] Changed test port from 8080 to 30158
Port 8080 is widely used and resulted in address conflicts on monojenkins, so we use a different port instead.

Commit licensed under MIT/X11.
2014-06-17 23:00:42 +02:00
Sebastien Pouliot 13ff02dc31 [System.ServiceModel.Web] Fix issue with types explicitly implementing IDictionary or IDictionary<,>
Issue: The previous code, with new tests [1], failed when the linker was
enabled.

That was caused because the code looks for the Keys and Item properties
getter using reflection. The linker handled that imperfectly (it left
some holes), in part because:

* System.Collections.Generic.IDictionary`2 does not implement
  System.Collections.IDictionary; and

* It preserved the explicit methods - not the implicit one that were
  used the the reflection-based code;

That later fact is also a bug (without the linker involvment) and solved
by this commit. A unit test was added to show the issue (NRE).

The patch also avoid the use of reflection for IDictionary since we can
simply typecast to get the same result (without the additional cost).
2014-05-26 17:27:26 -04:00
Antoine Cailliau b2b269b1e8 [Fix] DataContractJsonSerializer fails serializing/deserializing collections 2014-04-16 15:10:17 +02:00
Sebastien Pouliot 13b942c073 [System.ServiceModel.Web] Fix JsonQueryStringConverter.ConvertValueToString to work when running on any culture [#18437] 2014-03-17 21:46:33 -04:00
Sebastien Pouliot 56d406876f [System.ServiceModel.Web] Fix regression when converting strings using some (like German) cultures [#18131] and add unit test 2014-03-04 09:00:36 -05:00
Sebastien Pouliot f83814bfbb [test] Disable a test for XI (only) as it does not support dynamic proxy code generation 2014-01-14 10:09:46 -05:00
Atsushi Eno bf909bcbd0 fix bug #11335. 2014-01-10 19:04:58 +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 8a10b06610 Fix bug #13485: retrieve private fields and properties in serialization. 2013-08-05 15:36:24 +09:00
Sebastien Pouliot 7f8fa9a8a5 Allow running System.ServiceModel.Web unit tests on the MOBILE profiles (using the same .sources file) 2013-07-24 08:58:44 -04:00
Linquize ee48fc81a9 Atom10FeedFormatter should generate subtitle tag for Description property 2013-07-23 08:12:35 +08:00
Antonius Riha c63b7eba2d Add a test for UriTemplate.Match 2012-11-16 18:19:40 +01:00
Martin Baulig a0a7c13e5f Disable failing tests on the Mac.
* System.Drawing (filed #7940 about this):
  GraphicsTest.DrawFillRectangle_Width_2 and
  GraphicsTest.FillDrawRectangle_Width_2

* Mono.Posix (filed #7942):
  UnixUserTest.NonReentrantSyscalls

* WCF (filed #7943):
  CallbackBehaviorAttributeTest.CallbackExample1
  CallbackBehaviorAttributeTest.CallbackExample2
  UriTemplateTest.EscapedUriCandidate
  UriTemplateTest.SimpleWebGet
  AnnouncementClientTest.AnnonceOnlineOfflineAddressSchemeMismatch
2012-10-23 13:02:01 +02:00
Enrico Sada 3331041eea add QueryStringConverter String <-> Enum
fix bug https://bugzilla.xamarin.com/show_bug.cgi?id=5230
2012-08-10 01:42:36 +02:00
Dave Ferguson 825c7a9b79 Fix UriTemplate.Match to work with escaped uris
Fixes bug 4793
2012-05-01 08:42:02 -04:00
Peter Johanson bb8d09d41d Fix Bug #658, allowing uri templates with no text preceding a wildcard. 2012-02-14 08:17:06 -05: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 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
Miguel de Icaza 2852ed0b59 Update copyrights 2011-09-13 18:26:13 -04:00
Atsushi Eno 3d385eb270 Skip serialization when the return type is void.
This batch should fix bug #206.
2011-08-24 12:14:48 -07:00
Atsushi Eno 78c5897e95 When there was no path parameter, it ignored the whole path part. 2011-08-24 12:02:38 -07:00
Atsushi Eno cc8c07fb8c UriTemplate should not be mandatory, make it optional. Fix unit test. 2011-08-23 11:31:06 -07:00
Atsushi Eno 77ed4bb435 Support named wildcard in UriTemplate matching. Fixed bug #693996. 2011-05-23 20:31:00 +09:00
Atsushi Eno 15d313b0e3 Fix regression for counter case to 6005f0a7.
http://localhost/x + X should not result in http://localhost/xX.
2011-04-15 16:37:58 +09:00
Atsushi Eno 0dde95d9af Implement 4.0 WebOperationContext.Create[Atom10|Json]Response() methods. 2011-04-08 21:38:09 +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
Atsushi Eno 7917753273 null JSON type must be handled in JsonWriter. 2011-03-26 21:27:19 +09:00
Atsushi Eno 96ca8b4b42 More xml output fixes in XmlSyndicationContent and SydicationElementExtension.
They have couple of complicated xml outputs in both GetReader(AtContent)
and Write(Contents)To methods... check new tests for details.
2011-03-08 22:04:18 +09:00
Atsushi Eno eafe520c4b Couple of fixes around XmlSyndicationContent.GetReaderAtContent().
- The returned XmlReader is positioned at the beginning of the element.
- XmlSyndicationContent.GetReaderAtContent() returns XmlReader that begins
  with the "wrapper" which is dummy Atom 1.0 content element.
2011-03-08 18:56:00 +09:00
Atsushi Eno 2464cfc869 Read body content if required. Fixed all issues in bug #656020.
Now it considers message content format and IsWrapped[Request|Response] to
retrieve XmlObjectSerializer.
2011-01-20 15:32:33 +09:00
Atsushi Eno 997a5664a9 Enable duplicate "UriMatched" error check, with couple of FIXMEs.
.NET is very unclear about those UriTemplate behavior. Too minor to mind.
2011-01-19 20:22:45 +09:00
Atsushi Eno 7d5b5a1b7f Fix template match logic to first check HTTP-method-matching ones.
Part of the fix for bug #656020.
2011-01-19 19:01:49 +09:00
Marek Habersack 6005f0a7df [wcf] UriTemplate must trim the first leading slash in the rendered template.
When using BindBy{Name,Position} UriTemplate must remove the the first slash from
the rendered URI. This fixes the 4 failing tests.
2011-01-04 13:56:12 +01:00
Frank Wilhelm 37329cdd7c Make Validate() less restrictive for contracts with explicit UriTemplate. 2010-10-15 19:41:33 +09:00
Rolf Bjarne Kvinge f7a0fde4c6 JsonSerializationWriter: handle char values 2010-09-24 12:11:36 +02:00
Atsushi Eno a5043815da Override IsContentTypeSupported() in per-encoding-binding-element implementation to work as expected. 2010-09-24 16:26:28 +09:00
Atsushi Eno 5628b49a01 implemented large parts of WCF standard endpoints and configuration support. 2010-09-13 22:36:37 +09:00
Raja R Harinath cd51491631 Fix a few cases of mixed line-endings
This is a scripted conversion of mixed line-ending files to LF-only or CRLF-only
based on which patch is smaller.  I used a threshold of upto a quarter of the
lines to determine whether to keep the patch or not.
2010-07-26 02:20:13 +05:30
Raja R Harinath b293948fb7 EOL handling
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
Atsushi Eno cee551a2f4 2010-07-14 Atsushi Enomoto <[email protected]>
* WebMessageEncoder.cs : support Raw message in ReadMessage() too.
	  Allow null content type.

	* WebMessageFormatter.cs : do not depend on WebOperationContext.
	  add support for Raw format request.

	* WebMessageEncodingBindingElementTest.cs : add test for null
	  content type for ReadMessage() (allowed),

	* WebHttpBehaviorTest.cs : add test for deserializing Raw request
	  message too.


svn path=/trunk/mcs/; revision=160377
2010-07-14 18:24:54 +00:00
Atsushi Eno 74ec2c95ef 2010-07-14 Atsushi Enomoto <[email protected]>
* WebMessageFormatter.cs : add support for Raw format.

	* WebMessageEncoder.cs : support Raw message. Fixed bug #619542.

	* WebHttpBehaviorTest.cs : add test for bug #619542 (not sure if it
	  works on mono; run-test is broken in trunk. Verified under .NET).


svn path=/trunk/mcs/; revision=160341
2010-07-14 08:43:31 +00: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 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 607b85ba51 2010-06-22 Atsushi Enomoto <[email protected]>
* WebMessageEncodingBindingElement.cs : return MessageVersion in
	  GetProperty<T>(). Fixed WebHttpBinding working.

	* WebMessageEncodingBindingElementTest.cs : add test for
	  GetProperty<MessageVersion>().


svn path=/trunk/mcs/; revision=159316
2010-06-22 08:59:54 +00:00
Atsushi Eno a1375bd687 2010-05-24 Atsushi Enomoto <[email protected]>
* JsonQueryStringConverter.cs : objects are regarded serializable as
	  long as they are public here, with some exceptions (not implemented).

	* JsonQueryStringConverterTest.cs : add more tests for CanConvert()
	  and reorganized some classes to make tests rational.


svn path=/trunk/mcs/; revision=157795
2010-05-24 12:38:12 +00:00