User Tools

Site Tools


manual:JSON

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
manual:JSON [2019/06/24 00:49]
peternlewis
manual:JSON [2019/06/24 02:13]
peternlewis
Line 52: Line 52:
     {"​a":​3,"​b":​null}     {"​a":​3,"​b":​null}
  
-whereas the result of %JSONValuePretty%J%` will be:+whereas the result of `%JSONValuePretty%J%` will be:
  
     {     {
Line 79: Line 79:
 The default result format is Compact, Non-Strict. The default result format is Compact, Non-Strict.
  
-===== Actions ​===== +===== Use =====
  
 +There are [[:​Actions|actions]] to set dictionaries or variables from JSON containers, as well as an [[:action: Set_JSON_Value|action]] to set a field within a JSON object to a specified value.
  
 ===== Notes ===== ===== Notes =====
Line 87: Line 87:
 JSON objects must be properly legal to be processed. ​ In particular keys to objects must be strings, which means strings must be quoted with double quotes. `{ a : 3 }` is not valid, it must be `{ "​a"​ : 3 }`. JSON objects must be properly legal to be processed. ​ In particular keys to objects must be strings, which means strings must be quoted with double quotes. `{ a : 3 }` is not valid, it must be `{ "​a"​ : 3 }`.
  
-Although `3` and `"​a"​` are technically legal JSON, in cases of ambiguity, Keyboard Maestro will not consider a variable to contain JSON unless it is a container, ie an array or dictionary, which starts (without any leading white space) with a `{` or `[`, and ends with a matching bracket followed by optional white space. +Although `3` and `"​a"​` are technically legal JSON, in Non-Strict mode with cases of ambiguity, Keyboard Maestro will not consider a value or variable to contain JSON unless it is a container, ie an array or dictionary, which starts (without any leading white space) with a `{` or `[`, and ends with a matching bracket followed by optional white space.
  
manual/JSON.txt · Last modified: 2024/04/21 22:23 by peternlewis