From f927e89f9dcc7126e74913249e92a5633f23add0 Mon Sep 17 00:00:00 2001 From: Dmitry Mamontov Date: Mon, 2 Feb 2015 15:51:09 +0300 Subject: [PATCH] Fix debug && add trim --- RetailCrm/Extra/Tools.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/RetailCrm/Extra/Tools.cs b/RetailCrm/Extra/Tools.cs index f464251..16180f6 100644 --- a/RetailCrm/Extra/Tools.cs +++ b/RetailCrm/Extra/Tools.cs @@ -70,15 +70,14 @@ namespace RetailCrm.Extra if (valueObj.GetType() == typeof(JArray)) { string tmpValue = JsonConvert.SerializeObject(((JArray)valueObj).ToArray()); - value = tmpValue.Replace("[", "{"); - value = value.Replace("]", "}"); + char[] charsToTrim = { '[', ' ', ']'}; + value = tmpValue.Trim(charsToTrim); } else { value = valueObj.ToString(); } - System.Console.WriteLine(value); - System.Console.ReadLine(); + if (value != "") { if (valueObj.GetType() == typeof(JObject) || valueObj.GetType() == typeof(JArray))