PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 2024
→
Read a JSON in Windev ?
Read a JSON in Windev ?
Started by PRADEEP / Satin, Jan., 12 2020 2:07 AM - 3 replies
Connect yourself…
PRADEEP / Satin
#1
Registered member
6 messages
Posted on January, 12 2020 - 2:07 AM
Is it possible to read a JSON from an external website ?
JSONExécute - I get an error when I use this function in Windev "Function not supported in Windev"
[say, read from this link -
https://api.github.com/users/mralexgray/repos
]
Thanks in Advance.
--
Pradeep
Report
0
0
The Windevver
#2
Registered member
6 messages
Popularité : +1 (1 vote)
Posted on January, 12 2020 - 2:24 PM
Something like this will do
buf1 is Buffer
v1 is Variant
v2 is Variant
HTTPRequest("
https://api.github.com/users/mralexgray/repos
")
buf1 = HTTPGetResult(httpResult)
v1 = JSONToVariant(buf1)
FOR EACH v2 OF v1
Trace(v2.id,v2.name)
END
if you are on V24 yo can also use a JSON variable instead of a variant
--
Arie
Report
1
0
PRADEEP / Satin
#3
Registered member
6 messages
Posted on January, 14 2020 - 3:42 AM
Thank you for your response.
But I get an error with this code: {"message:"Not Found","
https://developer.github.com/v3/repos/…
"}
--
Pradeep
Report
0
0
PRADEEP / Satin
#4
Registered member
6 messages
Posted on January, 14 2020 - 7:50 AM
Thanks my friend. I decoded the output, and identified that JSON was transmitted as a compressed file - gzip.
I now need to understand the procedure to unzip, within the code.
--
Pradeep
Report
0
0
→ Go back to WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text