Error...is not a well-formed list of pairs?

not real sure here.

getting an error trying to display some json data. It doesn't like the the pair values coming back. In fact, its crashing both virtual emulator and USB phone emulator. The list pair looks correct to me...so unsure why isn't throwing an error.

image

Here is the json call and returned values. the code is written for multiple devices returned, but there is only 1 currently in the database.

I am using the same call<>.JsonTextDecodeWithDirctionaries I use elsewhere on other screens with success.

I've tried several things, unsure where to look now.

I pass the dictionary to a procedure where the values get called there. Which is where the issue is occuring. The pairs look good to me....

Here is the complete block

looking at another json response. I notices there is not square brackets around the response.

the call I am making and is failing is essentially a json array. Perhaps I am parsing the json incorrectly?

Anyone have any ideas?

5bed0a72164c5d1c416d576520e43734b8f92e6f_2_690x281

Funny, the responseContent I see in the first post is a JSON list (see the surrounding square brackets) with a single JSON object in it.

After the JSONDecodeWithDictionaries, you can test each level of whatever you got with the

  • is dictionary
  • is list

blocks.

dictionaries_is_dict
lists_is_list
(draggable)

P.S. Also, if you got a list, your loop should be For Each DeviceDict in list.
If you got a dictionary, you should not be looping over it, but instead interrogating each of its key/value pairs by name as needed.

So it comes back as a list. so I guess I need to figure how what to do next.

Select item 1 from list?

Use Do It on your globals to see what you have so far.

An example of how you might handle your "list"

then

image