mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 07:45:54 +01:00
Removed the long time deprecated support for "TMVCDataSetHolderSerializer" class in JSON default serializer. Switch to the modern ObjDict as the deprecation message says.
Some checks are pending
TOC Generator / TOC Generator (push) Waiting to run
Some checks are pending
TOC Generator / TOC Generator (push) Waiting to run
This commit is contained in:
parent
8ccf93c517
commit
7186f6aa6f
@ -725,7 +725,9 @@ end;
|
||||
function TMVCRESTClient.AddFile(const aName: string; aFileStreamValue: TStream; const aFileName, aContentType: string): IMVCRESTClient;
|
||||
begin
|
||||
Result := Self;
|
||||
{$WARNINGS OFF}
|
||||
GetBodyFormData.AddStream(aName, aFileStreamValue, aFileName, aContentType);
|
||||
{$WARNINGS ON}
|
||||
SetContentType(TMVCMediaType.MULTIPART_FORM_DATA);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
@ -292,20 +292,20 @@ end;
|
||||
procedure TMVCJsonDataObjectsSerializer.AfterConstruction;
|
||||
var
|
||||
lStreamSerializer: IMVCTypeSerializer;
|
||||
lDataSetHolderSerializer: TMVCDataSetHolderSerializer;
|
||||
fObjectDictionarySerializer: TMVCObjectDictionarySerializer;
|
||||
begin
|
||||
inherited AfterConstruction;
|
||||
lDataSetHolderSerializer := TMVCDataSetHolderSerializer.Create;
|
||||
GetTypeSerializers.Add(TypeInfo(TDataSetHolder), lDataSetHolderSerializer);
|
||||
lStreamSerializer := TMVCStreamSerializerJsonDataObject.Create;
|
||||
GetTypeSerializers.Add(TypeInfo(TStream), lStreamSerializer);
|
||||
GetTypeSerializers.Add(TypeInfo(TStringStream), lStreamSerializer);
|
||||
GetTypeSerializers.Add(TypeInfo(TFileStream), lStreamSerializer);
|
||||
GetTypeSerializers.Add(TypeInfo(TMemoryStream), lStreamSerializer);
|
||||
GetTypeSerializers.Add(TypeInfo(TBytesStream), lStreamSerializer);
|
||||
|
||||
fStringDictionarySerializer := TMVCStringDictionarySerializer.Create;
|
||||
GetTypeSerializers.Add(TypeInfo(TMVCStringDictionary), fStringDictionarySerializer);
|
||||
GetTypeSerializers.Add(TypeInfo(TGUID), TMVCGUIDSerializer.Create);
|
||||
|
||||
fObjectDictionarySerializer := TMVCObjectDictionarySerializer.Create(self);
|
||||
GetTypeSerializers.Add(TypeInfo(TMVCObjectDictionary), fObjectDictionarySerializer);
|
||||
GetTypeSerializers.Add(TypeInfo(TMVCListOfString { TList<string> } ), TMVCListOfStringSerializer.Create);
|
||||
|
Loading…
Reference in New Issue
Block a user