mirror of
https://github.com/retailcrm/api-client-dotnet.git
synced 2024-11-21 20:36:02 +03:00
Fix debug && add trim
This commit is contained in:
parent
867de6b357
commit
f927e89f9d
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user