[Free] JSONTools Extension - Version 4 Released


#22

i want to load a list with image title and date
50 elements as you can see image link is in the sub folder coin. which i dont get to work.
title is not the probem

pls show me that how it works.

I tried it with your blocks but than i get each time a other error


#23

Should just be able to use the following blocks, once you have parsed the JSON:
OpenObjectInArrayByIndex (16) -This opens the object inside index 16
Then GetStringValue(“title”)

For the child Objects try:

GetStringInSubJSONObject(0, “coin”, “icon”)

-OR-

OpenSubJSONObject then GetStringValue

After you have everything use SetPositionToRoot


#24

it does not work i made something wrong. if i do that what you say i get for each i get for each item the same image, but each item in that list from 0 to 50 have dfferent images. and thats the problem. i tried around a whole day. i get a error or i get now for each item the same image. and not the image what the item has.
and if i work withlist pairs i get not found.


#25

Not too sure how you are implementing it but those blocks I mentioned from JSONToolsExtension are the blocks you would need to use, you can use them inside a loop too that’s fine, you’d just need to set position to root at the end.


#26

Hi folks, hope domone can help.

I parse a json file in this structure:

Tried with these Blocks:

At least i get some value but i failed to enter the array. In fact i get the compete Array (has only 1 entry):

jsonerror


#27

In your JSON your data is an array represented by square brackets [ ], so you should remove the OpenSubJSONObject(data) block, the OpenJSONArray block should work, and you are on the right track with the OpenObjectInArrayByIndex block, you can use this block to get the object inside of each array index represented by the curly braces { }.


#28

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


#29

Thanks for the Update!

For all who run into the same problem like me here are the blocks that work for me:


#30

Hi folks me again,

is there a way to catch an error of an json block?

In my App i get a json string from an API an sometimes the API dont deliver the correct response. An when my App reads the false json the App stopps working:


#31

Just checking, are you using version 4 (new version) which includes checking for null or non existent data?

If so, could you let me know what code block you are using and I can look into it when I get a chance.

Cheers,
Luke


#32

My bad still on Version 3 i upgrade and test it, if i still run into problems i get back.
Sorry, and thanks for the fast response!


#33

No worries @Markus_Held, hope it all works as intended!