-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rebased onto master * add examples for dynamic import * WIP, at least one test isn't working * tests pass * all tests pass * test++ * test++ * test++ * timerManager restore --------- Co-authored-by: Geoffrey Hendrey <[email protected]>
- Loading branch information
1 parent
58da28f
commit 14bead3
Showing
12 changed files
with
260 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"to": "!${'Professor Falken'}", | ||
"greeting": "//${'Hello, ' & to}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"a": { | ||
"b": "${[c,' and ',$.c,' and ',$$.c,' are the same thing. $ (current context) is /a, the object in which this expression resides']~>$join}", | ||
"c": "hello" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"noradCommander": "${ norad.commanderDetails }", | ||
"norad": "${ $fetch('https://raw.githubusercontent.com/geoffhendrey/jsonataplay/main/norad.json') ~> handleRes ~> $import('/norad')}", | ||
"norad": "${ $fetch('https://raw.githubusercontent.com/geoffhendrey/jsonataplay/main/norad.json') ~> handleRes ~> $import}", | ||
"handleRes": "${ function($res){$res.ok? $res.json():{'error': $res.status}} }" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: Main | ||
SAY_HELLO: "${$fetch('https://raw.githubusercontent.com/geoffhendrey/jsonataplay/main/sayhello.json').json()}" | ||
view: | ||
- "/${SAY_HELLO ~> |props|{'name':'world'}| ~> $import}" | ||
- "/${SAY_HELLO ~> |props|{'name':'Universe'}| ~> $import}" | ||
- "/${SAY_HELLO ~> |props|{'name':'Galaxy'}| ~> $import}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Main | ||
SAY_HELLO: "${$fetch('https://raw.githubusercontent.com/geoffhendrey/jsonataplay/main/sayhello.json').json()}" | ||
now: "${ function(){$set('/timeString', $Date())} }" | ||
tick: "${ $setInterval(now , 1000) }" | ||
timeString: '' | ||
worldTime: ${ "World! " & timeString } | ||
universeTime: ${ "Universe! " & timeString } | ||
galaxyTime: ${ "Galaxy! " & timeString } | ||
view: | ||
- "../${SAY_HELLO ~> |props|{'name':'${$$.worldTime}'}| ~> $import}" | ||
- "../${SAY_HELLO ~> |props|{'name':'${$$.universeTime}'}| ~> $import}" | ||
- "../${SAY_HELLO ~> |props|{'name':'${$$.galaxyTime}'}| ~> $import}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"to": "Joshua", | ||
"message": "${$import('example/absoluteRoot.json')}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.