Support Forum

Ask questions and get help from MobileTogether experts.
MobileTogether Product Information
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
WildeKurt  
#1 Posted : Monday, April 18, 2016 9:22:59 PM(UTC)
WildeKurt

Rank: Newbie

Groups: Registered
Joined: 4/18/2016(UTC)
Posts: 8
United States
Location: Dallas, TX

I've been testing out your product and thus far really like it. One thing is alluding me at the moment: Using JSON data. I can return a single thing (e.g. Hello World) as a JSON from my web service however, how do I use more complex items. I don't see their elements in thier designer and am unsure as how to address individual things. Take for example, the following:

Quote:
{"Col1":[1,2,3,4,5,6],"Col2":[1,2,3,4,5,6],"Col3":[1,2,3,4,5,6],"Col4":[1,2,3,4,5,6],"Col5":[1,2,3,4,5,6],"Col6":[1,2,3,4,5,6],"Col7":[1,2,3,4,5,6]}


Thanks for the help

Kurt
bbv  
#2 Posted : Tuesday, April 19, 2016 10:23:30 AM(UTC)
bbv

Rank: Administration

Groups: Registered, Administrators
Joined: 7/21/2014(UTC)
Posts: 495

Was thanked: 87 time(s) in 87 post(s)
There are multiple ways how to do that. The simplest in your case is probably execute your web service once and then inform Designer to use current state as a structure. For example for this link which returns JSON structure about a book:

https://openlibrary.org/api/books?bibkeys=ISBN:0764532367&jscmd=data&format=json

You can do following steps:
  1. Add a HTTP page source with format set to JSON and the URL above
  2. Start simulation - this will populate your HTTP source with real data, which you can see in Page Sources tree in Simulator
  3. Right click $HTTP1 and execute Overwrite HTTP1 structure based on this tree - this will make structure available for design time


See accompanying images below
bbv attached the following image(s):
1.png
2.png
3.PNG
Users browsing this topic
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.