PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV Mobile 2024
→
JSON Array
JSON Array
Started by Mister RUAN, Aug., 14 2017 12:37 PM - No answer
Connect yourself…
Mister RUAN
#1
Registered member
208 messages
Popularité : +1 (1 vote)
Posted on August, 14 2017 - 12:37 PM
Good Afternoon
I have called a JSON Result with an array of vallues:
{
"User_Details"
:
{
"columns"
:
[
"ID"
,
"Name"
,
"Surname"
,
"Email"
]
,
"records"
:
[
[
1
,
"Name1"
,
"Surname1"
,
"mail1@email.com"
]
,
[
3
,
"Name2"
,
"Surname2"
,
"Mail2@email.com.com"
]
]
}
}
When it's a single value it's easy to add to my fields because the structure of the json is simple and I can get the values direct:
{
"ID"
:
1
,
"Name"
:
"Name1"
,
"Surname"
:
"Surname1"
,
"Email"
:
"mail1@email.com"
}
I cannot get the multiple result to my table - I have created a structure:
ST
MyRecords
is structure
ID
is int
Name
is string
Surname
is string
Email is string
END
ST
UserDetails
is structure
arrRecords
is array of string
END
And this is my code:
myrequest
is string
buf
Buf
is
Buffer
st
MyDetails
is
ST
UserDetails
myrequest
=
HTTPRequest
(
"https://getthejasonresponsehere/"
)
buf
Buf
=
HTTPGetResult
(
)
Deserialize
(
st
MyDetails
,
buf
Buf
,
psdJSON
)
I have tried so many scenarios and don't know where to go with this. I am using Windev Mobile 21 so there is no JSONtoVariant option.
Please can someone help me with the code.
Regards
Ruan
Report
0
0
→ Go back to WINDEV Mobile 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