Yaml to json linux

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

convert YAML to JSON and vice versa — provides yaml2json and json2yaml

License

GeoffWilliams/yamljson

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

This is a really simple CLI tool to convert between YAML and JSON. It’s written in Ruby and allows the full flexibily of whatever Ruby allows you to parse.

Installing the gem provides the following new commands:

$ yaml2json --input-file /path/to/yaml/file
$ yaml2json --input-file /path/to/yaml/file --no-pretty
$ json2yaml --input-file /path/to/json/file

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Читайте также:  Say hello kali linux

To install this gem onto your local machine, run bundle exec rake install . To release a new version, update the version number in version.rb , and then run bundle exec rake release , which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

bundle install bundle exec rake spec

Bug reports and pull requests are welcome on GitHub at https://github.com/GeoffWilliams/yamljson.

About

convert YAML to JSON and vice versa — provides yaml2json and json2yaml

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

An easy to use command line tool to convert YAML to JSON

License

buildkite/yaml2json

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

Readme.md

image

A command line tool to easily convert YAML to JSON

Pass it a YAML file and it’ll output JSON

$ yaml2json examples/basic.yml

It will return an exit code if it fails to succesfully parse the YAML.

Running the build script will create executables in the dist folder. One for Intel macOS, one for ARM macOS, and one for Linux.

$ ./scripts/build Building yaml2json 💨 Compiling for Intel macOS 👍 dist/yaml2json-darwin-amd64 Compiling for ARM macOS 👍 dist/yaml2json-darwin-arm64 Compiling for Linux 👍 dist/yaml2json-linux-amd64 All done! ✅ 
git clone git@github.com:buildkite/yaml2json.git cd yaml2json direnv allow go run main.go examples/basic.yml 
  1. Fork it
  2. Create your feature branch ( git checkout -b my-new-feature )
  3. Commit your changes ( git commit -am ‘Add some feature’ )
  4. Push to the branch ( git push origin my-new-feature )
  5. Create new Pull Request
Читайте также:  Cat grep linux примеры

Copyright (c) 2015 Keith Pitt, Buildkite Pty Ltd. See LICENSE for details.

About

An easy to use command line tool to convert YAML to JSON

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Command line tool that converts YAML to JSON

License

bruceadams/yj

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Simple command line tool to convert a YAML input file into a JSON output file.

% yj --help Command line tool that converts YAML to JSON Usage: yj [OPTIONS] [INPUT] Arguments: [INPUT] Input YAML file name. Defaults to stdin Options: -c, --compact Use compact formatting for the JSON output -y, --yaml Format the output as YAML instead of JSON -j, --json Parse the input as JSON. For most use cases, this option makes no difference. Valid JSON is valid YAML, so JSON input will (should?) parse correctly even when being handled with the YAML parser. Use this option when you want failure (instead of weird results) when the input is invalid JSON -o, --output OUTPUT> Output file name for the JSON. Defaults to stdout -h, --help Print help information -V, --version Print version information

Local build and install with cargo :

Prebuilt binaries are available on Github releases for some common platforms.

On macOS, the prebuilt binary can be installed using Homebrew. Unfortunately, Homebrew picked up a different utility with the name yj after I chose that name here. So, a simple brew install yj gets that tool, not this one 😞 .

$ brew tap bruceadams/utilities $ brew install bruceadams/utilities/yj

Alternatively on macOS, you may also install yj using MacPorts:

$ sudo port selfupdate $ sudo port install yj

Minimal Docker images are available on Docker Hub:

$ cat .travis.yml language: rust os: - linux - osx - windows rust: - stable - beta - nightly matrix: allow_failures: - rust: nightly fast_finish: true $ yj .travis.yml < "language": "rust", "os": [ "linux", "osx", "windows" ], "rust": [ "stable", "beta", "nightly" ], "matrix": < "allow_failures": [ < "rust": "nightly" > ], "fast_finish": true > > $ echo pi: 3.1415926 | yj < "pi": 3.1415926 > $ echo pi: 3.1415926 | yj -c "pi":3.1415926>$

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

A command-line utility to convert a YAML file (.yml) to JSON file (.json)

License

coolaj86/yaml2json

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

A command-line utility to convert YAML to JSON (meaning a .yml file to a .json file)

The purpose of this utility is to minify YAML as JSON. (ignore the misnomer, YAML is actually an Object Notation, not a Markup Language)

yaml2json ./example.yml json2yaml ./example.json | yaml2json
curl -s http://foobar3000.com/echo/echo.json | json2yaml | yaml2json wget -qO- http://foobar3000.com/echo/echo.json | json2yaml | yaml2json
--- foo: bar baz: - qux - quxx corge: null grault: 1 garply: true waldo: "false" fred: undefined
 "foo": "bar", "baz": [ "qux", "quxx" ], "corge": null, "grault": 1, "garply": true, "waldo": "false", "fred": "undefined" >

Note: JSON is a proper subset of YAML. The difference is that YAML can use whitespace instead of syntax, which is more human-readable. Also, YAML supports comments.

yaml2json has the following aliases:

About

A command-line utility to convert a YAML file (.yml) to JSON file (.json)

Источник

Оцените статью
Adblock
detector