What is the alternative for yaml
and json
keys for Map variable
#1700
simonrouse9461
started this conversation in
General
Replies: 1 comment 1 reply
-
Hey @simonrouse9461. The tasks:
default:
vars:
JSON: '{"a": 1, "b": 2, "c": 3}'
FOO:
ref: "fromJson .JSON"
cmds:
- echo {{.FOO}} This actually allows you to create maps without enabling the maps experiment too 😉 Here are the (WIP) docs for references: https://taskfile.dev/next/usage/#referencing-other-variables |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I saw in the unreleased changelog that
yaml
andjson
will not be available for Map variable experiment 2 for the next version.If that's the case what will be the alternative to load yaml and json strings?
I'm asking because I'm currently using experiment 2
yaml
key to load an external yaml file into a map variable. Is it still possible without usingyaml
key?Beta Was this translation helpful? Give feedback.
All reactions