Neste codigo estou tentado pegar o elemento message,
IF oHttps:Status <> 200
Arquivo_erro := HB_MEMOREAD( ArqXml )
hb_JsonDecode( Arquivo_erro, @hRet_erro )
If Len(hRet_erro) != 0
hwg_msginfo(str(Len(hRet_erro))) // 1
hwg_msginfo(valtoprg(hRet_erro)) // visualizar o todo o arquivo txt
if HHasKey(hRet_erro,'message')
E01 :=hRet_erro['message']
xTE := 5000
HWG_MSGTEMPO(E01, xTE)
endif
else
HWG_MSGSTOP([Erro abertura JSON],[Erro do sistema])
endif
ELSE
Hwg_msginfo([Status da remessa ]+ALLTRIM(vTXT01)+[ alterado para: ]+ALLTRIM(cSTATUS),[Aviso do sistema])
ENDIF
so que da a msg de erro:
Error BASE/1123 Erro nos parâmetros: HHASKEY
Called from ->HHASKEY(0)
Called from ->EDITAR_REMESSA(1294)
Called from ->EDITAR_SULAMERICA(1150)
Called from ->ALTERAR_REMESSA(1889)
Por favor, como consigo pegar o retorno "message " desse json, já tentei de tudo e não passa. Onde estou errando.
Alguma dica?
Grato.