diff --git a/Src/Asp.Net/SqlSugar/Utilities/DataTableExtensions.cs b/Src/Asp.Net/SqlSugar/Utilities/DataTableExtensions.cs index 1ffa1d148..08ee0da61 100644 --- a/Src/Asp.Net/SqlSugar/Utilities/DataTableExtensions.cs +++ b/Src/Asp.Net/SqlSugar/Utilities/DataTableExtensions.cs @@ -62,7 +62,9 @@ namespace SqlSugar foreach (DataRow row in table.Rows) { var json =row[firstName]; - var list = json.ToString().TrimStart('{').TrimEnd('}').Split(',').Select(it=>it.Split('=')).ToList(); + var list = json.ToString().TrimStart('{', ' ').TrimEnd('}', ' ') + .Split(new[] { ", " }, StringSplitOptions.None) + .Select(it => it.Split(new[] { " = " }, StringSplitOptions.None)).ToList(); foreach (var item in Regex.Split(firstName, UtilConstants.ReplaceKey)) { var x = list.First(it => it.First().Trim() == item.Trim()); diff --git a/Src/Asp.NetCore2/SqlSugar/Utilities/DataTableExtensions.cs b/Src/Asp.NetCore2/SqlSugar/Utilities/DataTableExtensions.cs index 1ffa1d148..08ee0da61 100644 --- a/Src/Asp.NetCore2/SqlSugar/Utilities/DataTableExtensions.cs +++ b/Src/Asp.NetCore2/SqlSugar/Utilities/DataTableExtensions.cs @@ -62,7 +62,9 @@ namespace SqlSugar foreach (DataRow row in table.Rows) { var json =row[firstName]; - var list = json.ToString().TrimStart('{').TrimEnd('}').Split(',').Select(it=>it.Split('=')).ToList(); + var list = json.ToString().TrimStart('{', ' ').TrimEnd('}', ' ') + .Split(new[] { ", " }, StringSplitOptions.None) + .Select(it => it.Split(new[] { " = " }, StringSplitOptions.None)).ToList(); foreach (var item in Regex.Split(firstName, UtilConstants.ReplaceKey)) { var x = list.First(it => it.First().Trim() == item.Trim()); diff --git a/Src/OracleUS7ASCII/SqlSugar/Utilities/DataTableExtensions.cs b/Src/OracleUS7ASCII/SqlSugar/Utilities/DataTableExtensions.cs index 1ffa1d148..08ee0da61 100644 --- a/Src/OracleUS7ASCII/SqlSugar/Utilities/DataTableExtensions.cs +++ b/Src/OracleUS7ASCII/SqlSugar/Utilities/DataTableExtensions.cs @@ -62,7 +62,9 @@ namespace SqlSugar foreach (DataRow row in table.Rows) { var json =row[firstName]; - var list = json.ToString().TrimStart('{').TrimEnd('}').Split(',').Select(it=>it.Split('=')).ToList(); + var list = json.ToString().TrimStart('{', ' ').TrimEnd('}', ' ') + .Split(new[] { ", " }, StringSplitOptions.None) + .Select(it => it.Split(new[] { " = " }, StringSplitOptions.None)).ToList(); foreach (var item in Regex.Split(firstName, UtilConstants.ReplaceKey)) { var x = list.First(it => it.First().Trim() == item.Trim());