Aula 1053 - WinDev json 2/... - Ler Jason e Adicionar Tabela - JSONVersVariant
//Blog com Video e Exemplo http://windevdesenvolvimento.blogspot.com.br/2017/02/aula-1053-windev-json-2-ler-jason-e.html
//Video Youtube https://www.youtube.com/watch?v=fY9AtlEkY-8
//Nessa aula vou mostrar como ler dados Json e colocar Tabela
s_json_dados is string=[ {"status": true,"valores": { "USD": {"nome": "Dolar","valor": 2.333,"ultima_consulta": 1386349203,"fonte": "UOL Economia - http://economia.uol.com.br/cotacoes/"}, "EUR": {"nome": "Euro","valor": 3.195,"ultima_consulta": 1386349203,"fonte": "UOL Economia - http://economia.uol.com.br/cotacoes/"}, "BTC": {"nome": "Bitcoin","valor": 2620,"ultima_consulta": 1386352803,"fonte": "Mercado Bitcoin - http://www.mercadobitcoin.com.br/" } } } ] let jz=JSONToVariant(s_json_dados) TableDeleteAll(TABLE_indices) FOR EACH _m OF jz..Member TableAddLine(TABLE_indices,_m..Name+TAB+" = "+_m..Value) TableAddLine(TABLE_indices,"=========================") mebros(_m) END INTERNAL PROCEDURE mebros(x) FOR EACH _m2 OF x..Member TableAddLine(TABLE_indices,_m2.nome,_m2.valor,_m2.fonte,_m2.ultima_consulta) END END |