瀏覽代碼

[jsonSerializer] TGUID more compatible

Exilon 3 年之前
父節點
當前提交
7c345010f9
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      Quick.Json.Serializer.pas

+ 3 - 2
Quick.Json.Serializer.pas

@@ -7,7 +7,7 @@
   Author      : Kike Pérez
   Author      : Kike Pérez
   Version     : 1.12
   Version     : 1.12
   Created     : 21/05/2018
   Created     : 21/05/2018
-  Modified    : 26/01/2022
+  Modified    : 18/02/2022
 
 
   This file is part of QuickLib: https://github.com/exilon/QuickLib
   This file is part of QuickLib: https://github.com/exilon/QuickLib
 
 
@@ -806,7 +806,8 @@ begin
           begin
           begin
             if aProperty.GetValue(aObject).TypeInfo = System.TypeInfo(TGUID) then
             if aProperty.GetValue(aObject).TypeInfo = System.TypeInfo(TGUID) then
             begin
             begin
-              rValue:=TValue.From<TGUID>(StringToGUID(UnQuotedStr(member.ToJSON,'"')));
+              //get value from TGUID string with and without {} (more compatibility)
+              rValue:=TValue.From<TGUID>(StringToGUIDEx(UnQuotedStr(member.ToJSON,'"')));
             end
             end
             else
             else
             begin
             begin