Last active
June 16, 2018 13:49
-
-
Save tkovs/f76c5077f2e030f4de860b22534dd4fb to your computer and use it in GitHub Desktop.
Mapeamento de json para objeto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"id": 1, | |
"nome": "Dolly", | |
"data_hora_criacao": "2018-04-10 11:22:22", | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
TEmpresa = Class | |
private | |
FId : Integer; | |
FNome : String; | |
FDataCriacao : TDateTime; | |
function GetId() : Integer; | |
function GetNome(): String; | |
procedure SetNome(const Value: String); | |
function GetDataCriacao(): TDateTime; | |
public | |
property Id : Integer | |
read GetId; | |
property Nome : String | |
read GetNome | |
write SetNome; | |
property DataCriacao : TDateTime | |
read GetDataCriacao; | |
constructor Create( | |
const AId : Integer; | |
const ANome : String; | |
const ADataCriacao : TDateTime; | |
); | |
End; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment