Fix: Warranty Provider Properties & JSON.net

This commit is contained in:
Gary Sharp
2013-05-21 11:23:45 +10:00
parent c79a736e70
commit 7befaccf4a
10 changed files with 30 additions and 32 deletions
+3 -3
View File
@@ -8,6 +8,7 @@ using Disco.BI;
using System.Web.Script.Serialization;
using Disco.Services.Plugins;
using Disco.Services.Plugins.Features.WarrantyProvider;
using Newtonsoft.Json;
namespace Disco.Web.Models.Job
{
@@ -38,12 +39,11 @@ namespace Disco.Web.Models.Job
public Dictionary<string, string> WarrantyProviderProperties()
{
Dictionary<string, string> p = default(Dictionary<string, string>);
if (string.IsNullOrEmpty(this.WarrantyProviderPropertiesJson))
if (!string.IsNullOrEmpty(this.WarrantyProviderPropertiesJson))
{
JavaScriptSerializer s = new JavaScriptSerializer();
try
{
p = s.Deserialize<Dictionary<string, string>>(this.WarrantyProviderPropertiesJson);
p = JsonConvert.DeserializeObject<Dictionary<string, string>>(this.WarrantyProviderPropertiesJson);
}
catch (Exception)
{