Dictionary actions not working any more in Shortcuts

Odd problem

I am working on creating calendar templates from a JSON object stored in a file in iCloud. So I created a Shortcut that can create a file and add a template:

https://www.icloud.com/shortcuts/51e54a19aee24ed5857d9a78b612ce26

This seems to work fine. It reads the file and shows a list of template names before it asks to add a new template.

The second Shortcut should read the file, create a list of the templates and present a list to choose from.
I started off with the same actions, reading the file and presenting the content. However, when I try to extract the keys from the dictionary, just like the first Shortcut I get a totally different content (ProfileName, Tiff and such). No matter what I do, I always get the same content from a dictionary.

Here is a link to a test shortcut that presents the problem: https://www.icloud.com/shortcuts/e3ce13b089d3473ca9f75a922b796ae3

I am on iPadOS 3.2 public beta.

UPDATE: after writing down this text I tried it again and now the first Shortcut presents the same problem.
I’ve restarted the iPad, but no difference.

So basically it looks like any dictionary action presents the content of what seems to be a fixed dictionary with file attributes.

This worked as I’d expected from reading it through. I didn’t get any file attribute details. It read in the root level JSON entry, which returned a data set or sub-dictionary if you like, of the elements.

I’m wondering if you are wanting something more like this for the second shortcut, where you choose which template, retrieve the data set (value) for that, and then enumerate those key value pairs.

https://www.icloud.com/shortcuts/46e893d5d78e43e6b11bde8f53ea2322

Note I’m testing on iPadOS 13.1.2.

(second try, somehow the post got lost)

I am working on creating calendar templates from a JSON object stored in a file in iCloud. So I created a Shortcut that can create a file and add a template:

https://www.icloud.com/shortcuts/51e54a19aee24ed5857d9a78b612ce26

This seems to work fine. It reads the file and shows a list of template names before it asks to add a new template.

The second Shortcut should read the file, create a list of the templates and present a list to choose from.
I started off with the same actions, reading the file and presenting the content. However, when I try to extract the keys from the dictionary, just like the first Shortcut I get a totally different content (ProfileName, Tiff and such). No matter what I do, I always get the same content from a dictionary.

Here is a link to a test shortcut that presents the problem: https://www.icloud.com/shortcuts/e3ce13b089d3473ca9f75a922b796ae3

I am on iPadOS 3.2 public beta.

UPDATE: after writing down this text I tried it again and now the first Shortcut presents the same problem.
I’ve restarted the iPad, but no difference.

I even tried to put the contents in a text action and get the keys from the that, but no luck.

It’s here…

Thanks. Sorry for posting twice.

Can you please tell me if you can replicate the problem?

Note, because the threads have been merged, my current take is actually appears earlier in this combined thread. :laughing:

Hi, I haven’t tried your shortcut yet, but I in the mean time I have tested the same shortcuts with a friend who also has an iPhone with 13.1.2. Like you he could confirm the shortcuts work as intended.

At the same time they present the odd behaviour on my iPhone and iPad both running 13.2 public beta.

I suspect I have run into a bug in 13.2.

I wonder if there is someone out there with 13.2 public beta on his/her iPhone or iPad who can confirm my findings.

Hi, I just ran your shortcut and it gives the same problem I have with my own shortcuts. So this convinces me that it’s a 13.2 bug.

Thanks for putting the shortcut together.

For those interested: I am now on iPadOS 13.2 beta 3 and the problem still exists.

I have tested with a simple JSON text which works fine:
{ “key”: “value” }

However, when there is something wrong in the JSON (like smart quotes in the example above) it presents the same problem.
So far I have found that smart quotes and a backslash in the JSON cause it to be read wrong.
And I finally found the problem: there was an invisible character, possibly a tab in my JSON. When I replaced it with something else, it worked.

For info, the JSON format definition is RFC 8259 and covers things like the structure and character encodings.

If you end up working with JSON a lot on i*OS, it may be worth looking into the Jayson app.

https://jayson.app/