Merge pull request #1 from dmamontov/master

Fix debug && add trim
This commit is contained in:
Alex Lushpai 2015-02-02 16:26:16 +03:00
commit 010b6c1c27

View File

@ -70,15 +70,14 @@ namespace RetailCrm.Extra
if (valueObj.GetType() == typeof(JArray)) if (valueObj.GetType() == typeof(JArray))
{ {
string tmpValue = JsonConvert.SerializeObject(((JArray)valueObj).ToArray<dynamic>()); string tmpValue = JsonConvert.SerializeObject(((JArray)valueObj).ToArray<dynamic>());
value = tmpValue.Replace("[", "{"); char[] charsToTrim = { '[', ' ', ']'};
value = value.Replace("]", "}"); value = tmpValue.Trim(charsToTrim);
} }
else else
{ {
value = valueObj.ToString(); value = valueObj.ToString();
} }
System.Console.WriteLine(value);
System.Console.ReadLine();
if (value != "") if (value != "")
{ {
if (valueObj.GetType() == typeof(JObject) || valueObj.GetType() == typeof(JArray)) if (valueObj.GetType() == typeof(JObject) || valueObj.GetType() == typeof(JArray))