chore: 修复 LCObject ToString() bug

oneRain 2020-05-27 12:43:06 +08:00
parent 2723b6213b
commit 8fd9a9f377
1 changed files with 4 additions and 1 deletions

View File

@ -462,7 +462,10 @@ namespace LeanCloud.Storage {
/// </summary>
/// <returns></returns>
public override string ToString() {
return JsonConvert.SerializeObject(LCObjectData.Encode(data));
Dictionary<string, object> originalData = LCObjectData.Encode(data);
Dictionary<string, object> currentData = estimatedData.Union(originalData.Where(kv => !estimatedData.ContainsKey(kv.Key)))
.ToDictionary(k => k.Key, v => v.Value);
return JsonConvert.SerializeObject(currentData);
}
/// <summary>