JSON Api Helper plugin

Find out what's going on with LiveCode (the company), product releases, announcements, and events.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

JSON Api Helper plugin

Post by AndyP » Thu Jul 23, 2020 9:51 pm

I've been working with a lot of web based apis recently which involves a lot of repetitive coding to get the json elements out of their tree and into fields. The process is as usual very easy in LiveCode but involves a lot of repetition which I don't like, and I always try to eliminate repetition where possible. So I built this little plugin to make my live easier and thought others might find it of help too.


Download from
http://livecodeshare.runrev.com/stack/9 ... API-Helper

Explainer video here
https://youtu.be/pNQAf0zF-ko
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

mrcoollion
Posts: 709
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: JSON Api Helper plugin

Post by mrcoollion » Fri Jul 24, 2020 8:11 am

Really nice work Andy :D

I can certainly use this because I also work with JSON data in my current application.
I will probably modify it a bit to also handle any Array and not only an array generated from a JSON file.

Thanks for sharing!

Paul

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3975
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: JSON Api Helper plugin

Post by bn » Fri Jul 24, 2020 11:49 am

Hi Andy,

thanks for the stack. It can come in quite handy.

I noticed that using the business edition all https sites did not work.
I had to issue from the message box:

Code: Select all

dispatch "revunloadLibrary" to stack "tsNetLibURL"
then it worked.
Somehow tsNetLibURL interferes with the "put url.." command when dealing with "https" in business edition. Community works fine. Did not text Indy.

Thanks again
Bernd

AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: JSON Api Helper plugin

Post by AndyP » Fri Jul 24, 2020 12:49 pm

mrcoollion wrote:
Fri Jul 24, 2020 8:11 am
Really nice work Andy :D

I can certainly use this because I also work with JSON data in my current application.
I will probably modify it a bit to also handle any Array and not only an array generated from a JSON file.

Thanks for sharing!

Paul
Thanks Paul, that's a good idea, I'll mod it so that pure arrays can also be selected.
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: JSON Api Helper plugin

Post by AndyP » Fri Jul 24, 2020 12:51 pm

bn wrote:
Fri Jul 24, 2020 11:49 am
Hi Andy,

thanks for the stack. It can come in quite handy.

I noticed that using the business edition all https sites did not work.
I had to issue from the message box:

Code: Select all

dispatch "revunloadLibrary" to stack "tsNetLibURL"
then it worked.
Somehow tsNetLibURL interferes with the "put url.." command when dealing with "https" in business edition. Community works fine. Did not text Indy.

Thanks again
Bernd
Hi Bernd, interesting, I was using the Indy version which worked just fine.
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

simon.schvartzman
Posts: 638
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: JSON Api Helper plugin

Post by simon.schvartzman » Fri Jul 24, 2020 5:23 pm

Hi Andy, many thanks for sharing, this is very useful and time saving.

Regards.
Simon
________________________________________
To ";" or not to ";" that is the question

mrcoollion
Posts: 709
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: JSON Api Helper plugin

Post by mrcoollion » Fri Jul 24, 2020 5:45 pm

AndyP wrote:
Fri Jul 24, 2020 12:49 pm

Thanks Paul, that's a good idea, I'll mod it so that pure arrays can also be selected.
Well then I will wait for a little to see what you come up with :D

bobcole
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 133
Joined: Tue Feb 23, 2010 10:53 pm
Location: Saint Louis, Missouri USA

Re: JSON Api Helper plugin

Post by bobcole » Sat Jul 25, 2020 3:45 pm

AndyP:
I like the way your video looks.
Explainer video
How did you create it? Software? Separate YouTube channel?
I haven't yet dabbled in video so I'm a beginner in that area. Any guidance would be appreciated.
Thanks,
Bob

AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: JSON Api Helper plugin

Post by AndyP » Sat Jul 25, 2020 5:52 pm

Hi Bob, I'm new to making videos too. So the opening and closing cards are made with Canva, I'm still using the free version. For the video editor, I'm using the paid version of Filmora from WonderShare which I find easy to use and intuitive, much like LiveCode

If you want a very easy to get started video editor, then I would suggest OpenShot. I started with this and then transitioned to Filmora after trying Davinci Resolve which has a full feature set but I found the learning curve was to high.. I like things simple.

Oh and I use OBS for capturing the desktop and overlaying the head and shoulders camera capture with a makeshift green screen made from some old curtain material.
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

keliko
Posts: 85
Joined: Thu Aug 01, 2019 8:15 am

Re: JSON Api Helper plugin

Post by keliko » Mon Jul 27, 2020 10:46 am

thanks andy very helpful

bobcole
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 133
Joined: Tue Feb 23, 2010 10:53 pm
Location: Saint Louis, Missouri USA

Re: JSON Api Helper plugin

Post by bobcole » Mon Jul 27, 2020 3:54 pm

AndyP:
Thanks for the recommendations. I have started looking at your three recommendations (Canva, OpenShot and OBS).
I have a lot to learn from my zero starting point!
Many thanks for your guidance,
Bob

Post Reply

Return to “Announcements”