User Tools

Site Tools


token:JSONValue

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
token:JSONValue [2019/06/24 09:00] – [Example] peternlewistoken:JSONValue [2024/04/22 02:23] (current) peternlewis
Line 13: Line 13:
 Strict mode affects how the result will be returned.  In Strict mode, the result will be a strict JSON objects - strings will be double quoted and appropriately escaped.  In Non-Strict mode, string results will be returned as the decoded and de-quoted string. Other types of results will be the same regardless of the Strict mode (containers are always be strictly JSON objects) (See the [[manual:JSON]] user manual section). Strict mode affects how the result will be returned.  In Strict mode, the result will be a strict JSON objects - strings will be double quoted and appropriately escaped.  In Non-Strict mode, string results will be returned as the decoded and de-quoted string. Other types of results will be the same regardless of the Strict mode (containers are always be strictly JSON objects) (See the [[manual:JSON]] user manual section).
  
-===== Example =====+===== Examples =====
  
 If a Keyboard Maestro variable `J` contains the JSON object: If a Keyboard Maestro variable `J` contains the JSON object:
Line 22: Line 22:
  
 ^ Token ^ Result ^ Comment ^ ^ Token ^ Result ^ Comment ^
-| `%JSONValue%J.a%` | `9` | (Variants have no affect) | +| `%JSONValue%J.a%` | `9` | (Variants have no effect) | 
-| `%JSONValue%J.b%` | `bravo` | (Compact/Pretty variant has no affect) | +| `%JSONValue%J.b%` | `bravo` | (Compact/Pretty variant has no effect) | 
-| `%JSONValueStrict%J.b%` | `"bravo"` | (Compact/Pretty variant has no affect) | +| `%JSONValueStrict%J.b%` | `"bravo"` | (Compact/Pretty variant has no effect) | 
-| `%JSONValue%J.c%` | `null` | (Variants have no affect) | +| `%JSONValue%J.c%` | `null` | (Variants have no effect) | 
-| `%JSONValue%J.d%` | `[11,"two",33]` | (Same as JSONValueCompact, Strict variant has no affect) |+| `%JSONValue%J.d%` | `[11,"two",33]` | (Same as JSONValueCompact, Strict variant has no effect) |
 | `%JSONValuePretty%J.d%` | `[\n\t11,\n\t"two",\n\t33\n]` | (\t is some form of indenting) | | `%JSONValuePretty%J.d%` | `[\n\t11,\n\t"two",\n\t33\n]` | (\t is some form of indenting) |
-| `%JSONValue%J.d[2]%` | `two` | (Compact/Pretty variant has no affect) | +| `%JSONValue%J.d[2]%` | `two` | (Compact/Pretty variant has no effect) | 
-| `%JSONValueStrict%J.d[2]%` | `"two"` | (Compact/Pretty variant has no affect) | +| `%JSONValueStrict%J.d[2]%` | `"two"` | (Compact/Pretty variant has no effect) | 
-| `%JSONValueStrict%J.d[0]%` | `3` | (Variants have no affect) |+| `%JSONValue%J.d[0]%` | `3` | (Variants have no effect) | 
 +| `%JSONValue%J.d[-2]%` | `two` | (the second last entry) | 
 +| `%JSONValue%J.d[COUNT()]%` | `3` | (the last entry) | 
 + 
 +The exact format of the white space in the Pretty format should not be assumed, it might be any number of spaces or tabs.
  
 ===== See Also ===== ===== See Also =====
Line 45: Line 49:
 === Functions === === Functions ===
  
-* [[function:DAY|DAY()]]+* [[function:JSONVALUE JSONVALUE(jsonpath)]] 
 +* [[function:COUNT | COUNT()]]
 * [[:Functions|See all Functions]] * [[:Functions|See all Functions]]
  
Line 52: Line 57:
 * [[token:JSONFromDictionary | JSONFromDictionary]] * [[token:JSONFromDictionary | JSONFromDictionary]]
 * [[token:JSONFromVariables | JSONFromVariables]] * [[token:JSONFromVariables | JSONFromVariables]]
-* [[token:JSONValue | JSONValue]] 
 * [[:Tokens|See all Tokens]] * [[:Tokens|See all Tokens]]
 +
 +=== Collections ===
 +
 +* [[collection:JSON_Keys | JSON Keys]]
 +* [[:Collections |See all Tokens]]
 +
token/JSONValue.1561366818.txt.gz · Last modified: by peternlewis

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki