[Free] JSONTools Extension - Version 4 Released


#1

Version 4 JSONToolsExtension is now available, complete with updated documentation and examples!

Version 4 brings more stability to the extension with checking for null values to prevent runtime errors in JSON that uses null values. Version 4 also fixes GetStringInArrayByIndex to use non-zero indexes.

You can find the extension, updated documentation, and sample project here: http://thunkableblocks.blogspot.com/2017/07/jsontools-extension.html


Json decode extension
How can I extract a string from JSON?
#2

Very Useful Extension. Keep it up brother


#3

It would be nice if you show the blocks and descripe them


#4

Sander,

Absolutely, I create documentation on all my extensions, I just haven’t gotten around to it for this one yet and wanted to release it as is for people to play around with, my blog does say (Images and more documentation coming soon) :wink:


#5

Good job @LukeGackle! Nice extension and thanks for adding docs and inages! :slight_smile:


#6

Great idea LukeGackle, so I created an app named “world wide map”. Look here:
http://appstore.bplaced.net/appstore/MapOfProjects/digitalNomad.apk
Have a nice developer day!
Peter


#7

Obrigado pela extensão, caiu como uma luva!


#8

Hello @LukeGackle

Great Extension. I have found few blocks missing in the uploaded extension!.



Thanks
Abdul


#10

Hi @mannankhanabdul,

I believe it may be the documentation that’s actually outdated, the methods have changed a couple of times, and in the new version I added the ability to change the position in the JSON.

You can still do everything that you could do with the extension before but just requires some modifications.

If the JSON you’re passing in is an array and you need to get the length of the root array, you can use the function SetCurrentPositionToRoot, then use the function GetCurrentArrayLength.

If there’s a json object inside an array that you need access to, you can use the method OpenObjectInArrayByIndex.

I hope this is helpful and I will note down that the documentation is out of date.

Kind regards,
Luke Gackle


#11

There is other issue i am facing- Sometimes in google api response results = few arrays are missing: Example in the same JSON-result first response has array “photos” and other response does not has the array “photo” due to which the subJSONArray stings fails and results stops working completely. Is there any way to bypass if array name is null ?

Thank you in advance!

sent you the JSON result in text file for your reference - privately to reproduce the issue.


#12

Hi @mannankhanabdul

As this is a beta extension there are likely to be issues and bugs and I’m so glad that you found one!

I’ve issued a sort of band-aid fix for the time being and will look into better ways to handle this in a future version of the extension, below is attached a new version of the extension which will return an empty string if the attribute is not found.

Note that this has only been fixed for the method that you are using (GetStringInSubJSONArray) and the issue May potentially affect other methods as well.

https://drive.google.com/file/d/1tvWG-2DV732ku91Dn0xlteTJJyk1_OMq/view?usp=sharing

Let me know how you go with the updated version.

Kind regards,
Luke Gackle


#13

Thanks for your quick turnaround. The Extension works fine now.

Best Regards
Abdul


#14

That’s fantastic to hear, I wish you all the best for the new year ahead!

Kind regards,
Luke Gackle


#15

@LukeGackle Can u please add Documentation or a video to explain all the functions…


#16

Any new updates for this extension? I am also having trouble with some JSON files in some cases, where there is “no value”.

I tried to use an if statement to check if the response result = null but it does not seem to work properly.


#17

Me too.


#18

Hey, I am looking for help to make an Reddit app. I supposed JSON is what it is, but I have no clue. Can you help?


#19

I’m back! sort of, still managing an overuse injury at the moment but things seem to be getting better, so behind the scenes I’ve done little bits of work here and there and am happy to release version 3 of JSONToolsExtension complete with some more in-depth documentation. :grinning:

You can view the list of new features and updated documentation at http://thunkableblocks.blogspot.com/2017/07/jsontools-extension.html


#20

how can i see when i have to open an array or a object. I and how can i open a sub folder that i can work with. for each item in list…
do add item to list.
all works fine the extension take for each item in the json the the right objects if you have no sub folder. If i have a sub folder and i open the objekt sub folder or anything else i font get a element for each element in the json file which i got from a api.
In that json file response i get 50 elements and that elements have sub folder and a folder in a sib folder.
I want to take from the object the title which is not in a subfilder. That works fine you get a list with 50 elements with the right title.
Than the list view have the possibility to set a image and a content for each elememt.
As i told the image is in a sub folder and again in a another sub folder.
But it does not work for me to get for each element the right image out of the json file.
If there is a sub folder in the folder it does not work i get a errror or a list without the image.

Thank you for your nice extension.


#21

Hi @KryptoPhil,

Your post is very confusing, I would recommend taking a look at my updated documentation which you will find helpful at http://thunkableblocks.blogspot.com/2017/07/jsontools-extension.html

Otherwise if you can post some sample JSON or a link to it I might be able to give you more information and tell you what methods you should be looking at.