This is a Beta version of my JSON Tools extension for App Inventor, this extension makes it easier to work with JSON and get the information you need out of a JSON String. Many online services have API’s which output in JSON format and this extension will enable you to easily decipher the JSON format.
As mentioned this is a beta release as I have been busy lately, I still wanted to release this extension and make it available for people to play around with, however, as a beta release please note that the methods available in this extension are not finalised and may change in future releases.
The first block to start using this extension is the ParseJSON block, this block takes in JSON as a String and internally converts it into an Object. (Images and more documentation coming soon)
This method sets the current position to the specified object, e.g. If you called OpenObject(”Phone”), this would internally open the phone object so that you can retrieve the values inside.
NEW! Updated Documentation 2019
I hope this updated documentation is helpful in understanding how this extension works, this will be updated over time but please bear with me as I am still working through an overuse injury, I want to keep working on this blog but rest is very important for me to keep doing these things in the future 🙂
Example – Updated for Version 3+ 2019
The following example takes some sample JSON found online which contains fictitious company contacts and locations, you can tap next and previous buttons to browse through the different contacts and the company coordinates are shown in a Google Maps component.
Screenshot of the blocks used in the JSONToolsExample project
× Note: this is a BETA version of this extension, the methods in this extension may change in future releases. Be sure to keep regular backups of your apps.