EtheaDev / InstantObjects

Pupular OOP-OPF Library for Delphi (from D10.1 to latest version)

Home Page:https://ethea.it/instantobjects/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type conflict between InstantClasses ==> TInstantStreamFormat & FireDAC.Stan.Intf ==> TFDStorageFormat

mderie opened this issue · comments

In InstantFireDAC

case BlobStreamFormat of
sfBinary: Result := Result + 'BlobStreamFormat=sfBinary'+sLineBreak;
sfXML: Result := Result + 'BlobStreamFormat=sfXML'+sLineBreak;
sfJSON: Result := Result + 'BlobStreamFormat=sfJSON'+sLineBreak;
end;

==> The three possible values exist in two different enumerations.
I know Delphi lacks of namespace support...

BTW : why a conditional define ?

TInstantStreamFormat = (
sfBinary
, sfXML
{$IFDEF DELPHI_NEON}
, sfJSON
{$ENDIF}
);

I've committed a new version that fixes this problem.
The conditiona define is necessary because the default streaming is XML.
If you want to serialize InstantObjects in JSON you need https://github.com/paolo-rossi/delphi-neon and compile with DELPHI_NEON define.
We are working on a REST server demo that uses https://github.com/andrea-magni/MARS server and delphi-neon in the next month.