[System.ServiceModel.Web] Fix JsonQueryStringConverter.ConvertValueToString to work...
[mono.git] / mcs / class / System.ServiceModel.Web / System.ServiceModel.Dispatcher / JsonQueryStringConverter.cs
index 87bd458413b2699626454a24ac6dca4419e77963..41d0e7572810bd21650953001cd21c9ef731d568 100644 (file)
@@ -5,6 +5,7 @@
 //     Atsushi Enomoto  <atsushi@ximian.com>
 //
 // Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+// Copyright 2014 Xamarin Inc. (http://www.xamarin.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -182,7 +183,8 @@ namespace System.ServiceModel.Dispatcher
                                        var qname = (XmlQualifiedName) parameter;
                                        return String.Concat ("\"", qname.Name, ":", qname.Namespace, "\"");
                                }
-                               return parameter.ToString ();
+                               var f = (parameter as IFormattable);
+                               return (f == null) ? parameter.ToString () : f.ToString (null, CultureInfo.InvariantCulture);
                        }
                }