You are not logged in.
Pages: 1
https://github.com/synopse/mORMot
SVN Version: 8975
-------------------------------
This structure used to generate Json by invoking the function _J_.Encode.
The function failed giving the file linked TCPAuth.Json.
TTCPAuthentication =
packed record
HostUniqueID : string;
ApplicationName : string;
ApplicationVersion : Extended;
LicenseRequired : Boolean;
JsonLicense : string;
LicenseRequested : Boolean;
Cert : string;
SessionID : Int64;
Challenge : string;
Signature : TBytes;
CompressAlgo : string;
UserProfile : Byte;
function Marshal:TBytes;
procedure Unmarshal(Bytes:TBytes);
end;
class function _J_.Encode<T>(Data:T):string;
var
RttiInfo : Pointer;
begin
try
RttiInfo := TypeInfo(T);
TTextWriter.RegisterCustomJSONSerializerSetOptions(RttiInfo,[soWriteIgnoreDefault],True);
Result := string(RecordSaveJSON(Data,RttiInfo,True));
except
Result := '';
end;
end;
SVN Version: 8777
-------------------------------
Please note that Json conversion worked well with this version.
Best regards.
Offline
Please retry with latest version.
I guess https://github.com/synopse/mORMot/commi … b364a5af9a may fix the problem (if you are using a Delphi Unicode revision).
Offline
Thank you.
It worked well with revision: 8984
Best regards.
Offline
Pages: 1