diff --git a/XSuperObject.pas b/XSuperObject.pas index ba27614..4f2265b 100644 --- a/XSuperObject.pas +++ b/XSuperObject.pas @@ -1551,7 +1551,7 @@ procedure TSuperArray.SaveTo(Stream: TStream; const Ident, UniversalTime: Boolea begin S := TStringStream.Create( AsJSON(Ident, UniversalTime) ); try - S.SaveToStream(S); + S.SaveToStream(Stream); finally S.Free; end; @@ -2424,6 +2424,14 @@ class procedure TSerializeParse.WriteMember(Data: Pointer; Member: Typ; SetValue(Data, MemberValue, Member, TValue.From(Ancestor.AsVariant)) end else + // Handle TGUID + if (RType = TypeInfo(TGUID)) then + begin + if IJSONData.Ancestor[Member].DataType <> dtNull then + SetValue(Data, MemberValue, Member, TValue.From(StringToGuid(IJSONData.Ancestor[Member].AsVariant))) + end + else + // End TGUID case RType.Kind of tkInteger: SetValue(Data, MemberValue, Member, Integer(IJSonData.I[Member]));