delphimvcframework/samples/middleware/AppControllerU.pas
daniele.teti 8fc2614a1d Now the JSONObjectToObject can deserialize the following tkClass:
- TStream
 - TObjectList<T> (only if the list itself is already created on the object)
 - TObject (only if the list itself is already created on the object)

MapperItemClassType has been aliased with MapperListOf to be more compliant to DORM and can be on the property itself or in the declaration of the type of the property (Check TEST TestComplexObjectToJSONObjectAndBack test)
2014-05-22 21:37:13 +00:00

33 lines
535 B
ObjectPascal

unit AppControllerU;
interface
uses MVCFramework,
MVCFramework.Logger,
Web.HTTPApp;
type
[MVCPath('/')]
TApp1MainController = class(TMVCController)
public
[MVCPath('/')]
[MVCHTTPMethod([httpGET])]
procedure Index(ctx: TWebContext);
end;
implementation
uses
System.SysUtils, MVCFramework.Commons;
{ TApp1MainController }
procedure TApp1MainController.Index(ctx: TWebContext);
begin
ContentType := TMVCMimeType.TEXT_PLAIN;
Render(StringOfChar('*', 1024));
end;
end.