From 8fd9a9f377f5c4939845f1f38dc0b9b816e4e943 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 27 May 2020 12:43:06 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BF=AE=E5=A4=8D=20LCObject=20ToStri?= =?UTF-8?q?ng()=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Storage/Storage/LCObject.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Storage/Storage/LCObject.cs b/Storage/Storage/LCObject.cs index aacc54f..4b832d2 100644 --- a/Storage/Storage/LCObject.cs +++ b/Storage/Storage/LCObject.cs @@ -462,7 +462,10 @@ namespace LeanCloud.Storage { /// /// public override string ToString() { - return JsonConvert.SerializeObject(LCObjectData.Encode(data)); + Dictionary originalData = LCObjectData.Encode(data); + Dictionary currentData = estimatedData.Union(originalData.Where(kv => !estimatedData.ContainsKey(kv.Key))) + .ToDictionary(k => k.Key, v => v.Value); + return JsonConvert.SerializeObject(currentData); } ///