i try to use hb_jsonDecode() for "this" Website but i got NIL ...
---
my old working Way
Code: Select all
oHttp:Open( "GET", cUrl, .F. ) // https://www.hmgforum.com/viewtopic.php?t=7403
oHttp:setRequestHeader( "User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0" )
oHttp:Send()
IF nStatus = 200
StrFile( oHttp:ResponseBody(), cFile )...
1st Try :
Code: Select all
PROCEDURE TestJSON()
LOCAL cFile, cMemo, aReturn,ii,nMax,aArray
cFile := "d:\PHPFORUM\HMG\T0007403.HTML"
cMemo := MEMOREAD(cFile)
aReturn := hb_jsonDecode(cMemo, @aArray )
altd()
RETURNbut aReturn is NIL and aArray is Empty ...
what i´m doing wrong
---
i try to change oHttp:setRequestHeader() to
Code: Select all
oHttp:setRequestHeader( "Content-Type", "text/xml; charset=utf-8")Code: Select all
* x1 := hb_jsonDecode( oHttp:responseText, @aArray )
x1 := hb_jsonDecode( oHttp:ResponseBody(), @aArray )
altd()---
can somebody show me how use use hb_jsonDecode() for "this" Website
need some help please