We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fromyaml
I saw #467 but this is not about input or output, just for parsing internally
So we could use it like this:
$ cat file.json { "stuff.yaml": "apiVersion: v1\nkind: Namespace\nmetadata:\n name: test\n" } $ cat file.json | jq '. | map(fromyaml)' [ { "apiVersion": "v1", "kind": "Namespace", "metadata": { "name": "test" } } ]
Working json example for reference;
$ cat file.json { "stuff.json": "{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"name\":\"test\"}}" } $ cat file.json | jq '. | map(fromjson)' [ { "apiVersion": "v1", "kind": "Namespace", "metadata": { "name": "test" } } ]
The text was updated successfully, but these errors were encountered:
fromjson
Hi, jq development is a bit stalled at the moment, but fq can do this already:
$ cat file.json | fq 'map(from_yaml)' [ { "apiVersion": "v1", "kind": "Namespace", "metadata": { "name": "test" } } ]
Sorry, something went wrong.
@wader Sorry, but we're trying to minimize our tools load and try to use tools that are common and mostly default
@cwrau 👍 No worries, very understandable. For now i think you probably have to use some additional tool to do this
No branches or pull requests
I saw #467 but this is not about input or output, just for parsing internally
So we could use it like this:
Working json example for reference;
The text was updated successfully, but these errors were encountered: