Dictionaries: Any Advantage Over JSON?

I’m exploring with using JSON / Dictionaries more, since it seems like a great way to reduce the number of repetitive actions and individual variables needed within macros.

I am constantly using the preferences area to inspect the values of KM variables. From my experimentation, it seems that you can’t really inspect dictionaries easily like you can normal variables, so that definitely makes them less enticing to work with. However, you can use JSON within variables, and my understanding is that you can pretty much do everything and more than with Dictionaries, and you can still inspect the contents within the preferences > variables.

So my question is, is there any use case where one would prefer using dictionaries over JSON?

I know it’s maybe a less practical and academic question, but I find that I uncover new areas of power inside KM when I make the effort to learn some of these concepts that are otherwise easy to avoid.

Thanks in advance!


Hey Joel,

I personally dislike dictionaries.

  1. They are completely opaque to the user without specialized macros for dumping them.
  2. They are a pain to set up, unless you use the Set Dictionary to JSON action or AppleScript.

JSON can be stored in a Keyboard Maestro variable for easy inspection, or a file for even more flexible management.

Yada, yada...