Advertisement
filhotecmail

JsonSerializador

Sep 6th, 2018
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 11.82 KB | None | 0 0
  1. unit RootUnit;
  2.  
  3. //  *************************************************
  4. //    Generated By: JsonToDelphiClass - 0.65
  5. //    Project link: https://github.com/PKGeorgiev/Delphi-JsonToDelphiClass
  6. //    Generated On: 2018-09-06 23:18:47
  7. //  *************************************************
  8. //    Created By  : Petar Georgiev - 2014
  9. //    WebSite     : http://pgeorgiev.com
  10. //  *************************************************
  11.  
  12. interface
  13.  
  14. uses Generics.Collections, Rest.Json;
  15.  
  16. type
  17.  
  18. TItemClass = class
  19. private
  20.   FCONFIG_INIVENDAAUTO: String;
  21.   FDATA: String;
  22.   FDAV_IMPRIMEDAVINFO: String;
  23.   FEMIT_BAIRRO: String;
  24.   FEMIT_CEP: String;
  25.   FEMIT_CNPJ: Extended;
  26.   FEMIT_CODESTADO: Extended;
  27.   FEMIT_CODMUNI: Extended;
  28.   FEMIT_CODPAIS: String;
  29.   FEMIT_COMPL: String;
  30.   FEMIT_EMAIL: String;
  31.   FEMIT_ENDER: String;
  32.   FEMIT_ESTADO: String;
  33.   FEMIT_FANTASIA: String;
  34.   FEMIT_IE: Extended;
  35.   FEMIT_IM: String;
  36.   FEMIT_INDICERATISSQN: Extended;
  37.   FEMIT_INDICEREGIMETRIB: Extended;
  38.   FEMIT_INDICEREGTRIBISSQN: Extended;
  39.   FEMIT_INDRATISSQN: String;
  40.   FEMIT_LICENCA: String;
  41.   FEMIT_MUNIC: String;
  42.   FEMIT_NUM: Extended;
  43.   FEMIT_PAIS: String;
  44.   FEMIT_RAZAO: String;
  45.   FEMIT_REGIMETRIB: String;
  46.   FEMIT_REGTRIBISSQN: String;
  47.   FEMIT_UF: String;
  48.   FEQUIP_AMBIENTE: Extended;
  49.   FEQUIP_BOOLFORMATARXML: Extended;
  50.   FEQUIP_BOOLSALVACFEENVIO: Extended;
  51.   FEQUIP_BOOLSALVARCFECANC: Extended;
  52.   FEQUIP_BOOLSAVARCFE: Extended;
  53.   FEQUIP_BOOLSEPARARPCNPJ: Extended;
  54.   FEQUIP_BOOLSEPARARPMES: Extended;
  55.   FEQUIP_BOOLUTF8: String;
  56.   FEQUIP_CAMINHOSATDLL: Extended;
  57.   FEQUIP_CODATIVSAT: Extended;
  58.   FEQUIP_CODEMERG: Extended;
  59.   FEQUIP_CODUF: String;
  60.   FEQUIP_IDAMBIENTE: String;
  61.   FEQUIP_IDMODELSTDSAT: String;
  62.   FEQUIP_MARCAMODEL: Extended;
  63.   FEQUIP_MODELSTDSAT: Extended;
  64.   FEQUIP_PAGCOD: String;
  65.   FEQUIP_SN: String;
  66.   FEQUIP_VERSAO: Extended;
  67.   FEXTR_MSGCONTRIBUINTE: Extended;
  68.   FEXTR_SATCOMPLETO: Extended;
  69.   FHORA: String;
  70.   FID: Extended;
  71.   FIMP_BOOLIMPFIRSTLINE: Extended;
  72.   FIMP_BOOLUSARESCPOS: String;
  73.   FIMP_COLUNAS: Extended;
  74.   FIMP_CORTAPAPEL: Extended;
  75.   FIMP_DEVICEBAUD: String;
  76.   FIMP_DEVICEDATABYTES: String;
  77.   FIMP_DEVICEHANDSH: Extended;
  78.   FIMP_DEVICEHANDSHKBOLL: Extended;
  79.   FIMP_DEVICEHARDFLW: String;
  80.   FIMP_DEVICEPARITY: Extended;
  81.   FIMP_DEVICEPARITYBOOL: Extended;
  82.   FIMP_DEVICEPORTA: Extended;
  83.   FIMP_DEVICESOFTFLW: Extended;
  84.   FIMP_DEVICESTOPBYTES: Extended;
  85.   FIMP_ESPENTRELINES: Extended;
  86.   FIMP_IDPORTA: String;
  87.   FIMP_INDMODELO: String;
  88.   FIMP_INDPAGCODIGO: Extended;
  89.   FIMP_LINHASPULAR: Extended;
  90.   FIMP_MODELO: Extended;
  91.   FIMP_PAGCODIGO: Extended;
  92.   FIMP_PORTA: Extended;
  93.   FKEY_UNLOCK: String;
  94.   FNUM_COPIASSAT: String;
  95.   FPDV_IP: String;
  96.   FPDV_MAC: String;
  97.   FPDV_NCAIXA: Extended;
  98.   FPDV_SISOPERACIONAL: String;
  99.   FPOS_BAIXO: String;
  100.   FPOS_CIMA: String;
  101.   FPOS_ESPACOFINAL: String;
  102.   FPOS_MARGEMDIREITA: String;
  103.   FPOS_MARGEM_ESQUERDA: String;
  104.   FPROMO_ATIVADO: String;
  105.   FPROMO_DATAFIM: String;
  106.   FPROMO_DATAINI: String;
  107.   FPROMO_MENSAGEM: String;
  108.   FPROMO_VALOR: String;
  109.   FSOFTH_ASSINATURASW: Extended;
  110.   FSOFTH_CNPJ: Extended;
  111.   FSO_IPTERM: String;
  112.   FSO_MEMORY: String;
  113.   FSO_NAMEWINDOWS: String;
  114.   FTAMANHO_PAPEL: String;
  115.   FTIPOEXTRATODESC: String;
  116.   FTIPOEXTRATO_BOLL: String;
  117. public
  118.   property CONFIG_INIVENDAAUTO: String read FCONFIG_INIVENDAAUTO write FCONFIG_INIVENDAAUTO;
  119.   property DATA: String read FDATA write FDATA;
  120.   property DAV_IMPRIMEDAVINFO: String read FDAV_IMPRIMEDAVINFO write FDAV_IMPRIMEDAVINFO;
  121.   property EMIT_BAIRRO: String read FEMIT_BAIRRO write FEMIT_BAIRRO;
  122.   property EMIT_CEP: String read FEMIT_CEP write FEMIT_CEP;
  123.   property EMIT_CNPJ: Extended read FEMIT_CNPJ write FEMIT_CNPJ;
  124.   property EMIT_CODESTADO: Extended read FEMIT_CODESTADO write FEMIT_CODESTADO;
  125.   property EMIT_CODMUNI: Extended read FEMIT_CODMUNI write FEMIT_CODMUNI;
  126.   property EMIT_CODPAIS: String read FEMIT_CODPAIS write FEMIT_CODPAIS;
  127.   property EMIT_COMPL: String read FEMIT_COMPL write FEMIT_COMPL;
  128.   property EMIT_EMAIL: String read FEMIT_EMAIL write FEMIT_EMAIL;
  129.   property EMIT_ENDER: String read FEMIT_ENDER write FEMIT_ENDER;
  130.   property EMIT_ESTADO: String read FEMIT_ESTADO write FEMIT_ESTADO;
  131.   property EMIT_FANTASIA: String read FEMIT_FANTASIA write FEMIT_FANTASIA;
  132.   property EMIT_IE: Extended read FEMIT_IE write FEMIT_IE;
  133.   property EMIT_IM: String read FEMIT_IM write FEMIT_IM;
  134.   property EMIT_INDICERATISSQN: Extended read FEMIT_INDICERATISSQN write FEMIT_INDICERATISSQN;
  135.   property EMIT_INDICEREGIMETRIB: Extended read FEMIT_INDICEREGIMETRIB write FEMIT_INDICEREGIMETRIB;
  136.   property EMIT_INDICEREGTRIBISSQN: Extended read FEMIT_INDICEREGTRIBISSQN write FEMIT_INDICEREGTRIBISSQN;
  137.   property EMIT_INDRATISSQN: String read FEMIT_INDRATISSQN write FEMIT_INDRATISSQN;
  138.   property EMIT_LICENCA: String read FEMIT_LICENCA write FEMIT_LICENCA;
  139.   property EMIT_MUNIC: String read FEMIT_MUNIC write FEMIT_MUNIC;
  140.   property EMIT_NUM: Extended read FEMIT_NUM write FEMIT_NUM;
  141.   property EMIT_PAIS: String read FEMIT_PAIS write FEMIT_PAIS;
  142.   property EMIT_RAZAO: String read FEMIT_RAZAO write FEMIT_RAZAO;
  143.   property EMIT_REGIMETRIB: String read FEMIT_REGIMETRIB write FEMIT_REGIMETRIB;
  144.   property EMIT_REGTRIBISSQN: String read FEMIT_REGTRIBISSQN write FEMIT_REGTRIBISSQN;
  145.   property EMIT_UF: String read FEMIT_UF write FEMIT_UF;
  146.   property EQUIP_AMBIENTE: Extended read FEQUIP_AMBIENTE write FEQUIP_AMBIENTE;
  147.   property EQUIP_BOOLFORMATARXML: Extended read FEQUIP_BOOLFORMATARXML write FEQUIP_BOOLFORMATARXML;
  148.   property EQUIP_BOOLSALVACFEENVIO: Extended read FEQUIP_BOOLSALVACFEENVIO write FEQUIP_BOOLSALVACFEENVIO;
  149.   property EQUIP_BOOLSALVARCFECANC: Extended read FEQUIP_BOOLSALVARCFECANC write FEQUIP_BOOLSALVARCFECANC;
  150.   property EQUIP_BOOLSAVARCFE: Extended read FEQUIP_BOOLSAVARCFE write FEQUIP_BOOLSAVARCFE;
  151.   property EQUIP_BOOLSEPARARPCNPJ: Extended read FEQUIP_BOOLSEPARARPCNPJ write FEQUIP_BOOLSEPARARPCNPJ;
  152.   property EQUIP_BOOLSEPARARPMES: Extended read FEQUIP_BOOLSEPARARPMES write FEQUIP_BOOLSEPARARPMES;
  153.   property EQUIP_BOOLUTF8: String read FEQUIP_BOOLUTF8 write FEQUIP_BOOLUTF8;
  154.   property EQUIP_CAMINHOSATDLL: Extended read FEQUIP_CAMINHOSATDLL write FEQUIP_CAMINHOSATDLL;
  155.   property EQUIP_CODATIVSAT: Extended read FEQUIP_CODATIVSAT write FEQUIP_CODATIVSAT;
  156.   property EQUIP_CODEMERG: Extended read FEQUIP_CODEMERG write FEQUIP_CODEMERG;
  157.   property EQUIP_CODUF: String read FEQUIP_CODUF write FEQUIP_CODUF;
  158.   property EQUIP_IDAMBIENTE: String read FEQUIP_IDAMBIENTE write FEQUIP_IDAMBIENTE;
  159.   property EQUIP_IDMODELSTDSAT: String read FEQUIP_IDMODELSTDSAT write FEQUIP_IDMODELSTDSAT;
  160.   property EQUIP_MARCAMODEL: Extended read FEQUIP_MARCAMODEL write FEQUIP_MARCAMODEL;
  161.   property EQUIP_MODELSTDSAT: Extended read FEQUIP_MODELSTDSAT write FEQUIP_MODELSTDSAT;
  162.   property EQUIP_PAGCOD: String read FEQUIP_PAGCOD write FEQUIP_PAGCOD;
  163.   property EQUIP_SN: String read FEQUIP_SN write FEQUIP_SN;
  164.   property EQUIP_VERSAO: Extended read FEQUIP_VERSAO write FEQUIP_VERSAO;
  165.   property EXTR_MSGCONTRIBUINTE: Extended read FEXTR_MSGCONTRIBUINTE write FEXTR_MSGCONTRIBUINTE;
  166.   property EXTR_SATCOMPLETO: Extended read FEXTR_SATCOMPLETO write FEXTR_SATCOMPLETO;
  167.   property HORA: String read FHORA write FHORA;
  168.   property ID: Extended read FID write FID;
  169.   property IMP_BOOLIMPFIRSTLINE: Extended read FIMP_BOOLIMPFIRSTLINE write FIMP_BOOLIMPFIRSTLINE;
  170.   property IMP_BOOLUSARESCPOS: String read FIMP_BOOLUSARESCPOS write FIMP_BOOLUSARESCPOS;
  171.   property IMP_COLUNAS: Extended read FIMP_COLUNAS write FIMP_COLUNAS;
  172.   property IMP_CORTAPAPEL: Extended read FIMP_CORTAPAPEL write FIMP_CORTAPAPEL;
  173.   property IMP_DEVICEBAUD: String read FIMP_DEVICEBAUD write FIMP_DEVICEBAUD;
  174.   property IMP_DEVICEDATABYTES: String read FIMP_DEVICEDATABYTES write FIMP_DEVICEDATABYTES;
  175.   property IMP_DEVICEHANDSH: Extended read FIMP_DEVICEHANDSH write FIMP_DEVICEHANDSH;
  176.   property IMP_DEVICEHANDSHKBOLL: Extended read FIMP_DEVICEHANDSHKBOLL write FIMP_DEVICEHANDSHKBOLL;
  177.   property IMP_DEVICEHARDFLW: String read FIMP_DEVICEHARDFLW write FIMP_DEVICEHARDFLW;
  178.   property IMP_DEVICEPARITY: Extended read FIMP_DEVICEPARITY write FIMP_DEVICEPARITY;
  179.   property IMP_DEVICEPARITYBOOL: Extended read FIMP_DEVICEPARITYBOOL write FIMP_DEVICEPARITYBOOL;
  180.   property IMP_DEVICEPORTA: Extended read FIMP_DEVICEPORTA write FIMP_DEVICEPORTA;
  181.   property IMP_DEVICESOFTFLW: Extended read FIMP_DEVICESOFTFLW write FIMP_DEVICESOFTFLW;
  182.   property IMP_DEVICESTOPBYTES: Extended read FIMP_DEVICESTOPBYTES write FIMP_DEVICESTOPBYTES;
  183.   property IMP_ESPENTRELINES: Extended read FIMP_ESPENTRELINES write FIMP_ESPENTRELINES;
  184.   property IMP_IDPORTA: String read FIMP_IDPORTA write FIMP_IDPORTA;
  185.   property IMP_INDMODELO: String read FIMP_INDMODELO write FIMP_INDMODELO;
  186.   property IMP_INDPAGCODIGO: Extended read FIMP_INDPAGCODIGO write FIMP_INDPAGCODIGO;
  187.   property IMP_LINHASPULAR: Extended read FIMP_LINHASPULAR write FIMP_LINHASPULAR;
  188.   property IMP_MODELO: Extended read FIMP_MODELO write FIMP_MODELO;
  189.   property IMP_PAGCODIGO: Extended read FIMP_PAGCODIGO write FIMP_PAGCODIGO;
  190.   property IMP_PORTA: Extended read FIMP_PORTA write FIMP_PORTA;
  191.   property KEY_UNLOCK: String read FKEY_UNLOCK write FKEY_UNLOCK;
  192.   property NUM_COPIASSAT: String read FNUM_COPIASSAT write FNUM_COPIASSAT;
  193.   property PDV_IP: String read FPDV_IP write FPDV_IP;
  194.   property PDV_MAC: String read FPDV_MAC write FPDV_MAC;
  195.   property PDV_NCAIXA: Extended read FPDV_NCAIXA write FPDV_NCAIXA;
  196.   property PDV_SISOPERACIONAL: String read FPDV_SISOPERACIONAL write FPDV_SISOPERACIONAL;
  197.   property POS_BAIXO: String read FPOS_BAIXO write FPOS_BAIXO;
  198.   property POS_CIMA: String read FPOS_CIMA write FPOS_CIMA;
  199.   property POS_ESPACOFINAL: String read FPOS_ESPACOFINAL write FPOS_ESPACOFINAL;
  200.   property POS_MARGEMDIREITA: String read FPOS_MARGEMDIREITA write FPOS_MARGEMDIREITA;
  201.   property POS_MARGEM_ESQUERDA: String read FPOS_MARGEM_ESQUERDA write FPOS_MARGEM_ESQUERDA;
  202.   property PROMO_ATIVADO: String read FPROMO_ATIVADO write FPROMO_ATIVADO;
  203.   property PROMO_DATAFIM: String read FPROMO_DATAFIM write FPROMO_DATAFIM;
  204.   property PROMO_DATAINI: String read FPROMO_DATAINI write FPROMO_DATAINI;
  205.   property PROMO_MENSAGEM: String read FPROMO_MENSAGEM write FPROMO_MENSAGEM;
  206.   property PROMO_VALOR: String read FPROMO_VALOR write FPROMO_VALOR;
  207.   property SOFTH_ASSINATURASW: Extended read FSOFTH_ASSINATURASW write FSOFTH_ASSINATURASW;
  208.   property SOFTH_CNPJ: Extended read FSOFTH_CNPJ write FSOFTH_CNPJ;
  209.   property SO_IPTERM: String read FSO_IPTERM write FSO_IPTERM;
  210.   property SO_MEMORY: String read FSO_MEMORY write FSO_MEMORY;
  211.   property SO_NAMEWINDOWS: String read FSO_NAMEWINDOWS write FSO_NAMEWINDOWS;
  212.   property TAMANHO_PAPEL: String read FTAMANHO_PAPEL write FTAMANHO_PAPEL;
  213.   property TIPOEXTRATODESC: String read FTIPOEXTRATODESC write FTIPOEXTRATODESC;
  214.   property TIPOEXTRATO_BOLL: String read FTIPOEXTRATO_BOLL write FTIPOEXTRATO_BOLL;
  215.   function ToJsonString: string;
  216.   class function FromJsonString(AJsonString: string): TItemClass;
  217. end;
  218.  
  219. TRootClass = class
  220. private
  221.   FItems: TArray<TItemClass>;
  222. public
  223.   property Items: TArray<TItemClass> read FItems write FItems;
  224.   destructor Destroy; override;
  225.   function ToJsonString: string;
  226.   class function FromJsonString(AJsonString: string): TRootClass;
  227. end;
  228.  
  229. implementation
  230.  
  231. {TItemClass}
  232.  
  233.  
  234. function TItemClass.ToJsonString: string;
  235. begin
  236.   result := TJson.ObjectToJsonString(self);
  237. end;
  238.  
  239. class function TItemClass.FromJsonString(AJsonString: string): TItemClass;
  240. begin
  241.   result := TJson.JsonToObject<TItemClass>(AJsonString)
  242. end;
  243.  
  244. {TRootClass}
  245.  
  246. destructor TRootClass.Destroy;
  247. var
  248.   LItemsItem: TItemClass;
  249. begin
  250.  
  251.  for LItemsItem in FItems do
  252.    LItemsItem.free;
  253.  
  254.   inherited;
  255. end;
  256.  
  257. function TRootClass.ToJsonString: string;
  258. begin
  259.   result := TJson.ObjectToJsonString(self);
  260. end;
  261.  
  262. class function TRootClass.FromJsonString(AJsonString: string): TRootClass;
  263. begin
  264.   result := TJson.JsonToObject<TRootClass>(AJsonString)
  265. end;
  266.  
  267. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement