A small tool for converting YAML files into JSON.
stdin pipe:
cat file.yml | yaml2json
or specify a file:
yaml2json path/file.yml
convert YAML to JSON.
License: BSD 2-Clause "Simplified" License
command issued :
cat 211028.yaml | yaml2json
Error :
panic: interface conversion: interface {} is float64, not string
goroutine 1 [running]:
main.decode(0x5192c0, 0xc4200768a0, 0xffffffffffffffff, 0x0)
/home/travis/gopath/src/github.com/wakeful/yaml2json/decode.go:8 +0x359
main.decode(0x50d8e0, 0xc42019e100, 0xc4200125fc, 0x4)
/home/travis/gopath/src/github.com/wakeful/yaml2json/decode.go:13 +0xd1
main.decode(0x5192c0, 0xc420076870, 0xc420043c98, 0x0)
/home/travis/gopath/src/github.com/wakeful/yaml2json/decode.go:8 +0x248
main.decode(0x5192c0, 0xc4200767e0, 0xffffffffffffffff, 0x0)
/home/travis/gopath/src/github.com/wakeful/yaml2json/decode.go:8 +0x248
main.decode(0x50d8e0, 0xc42019e640, 0xc420043e58, 0x0)
/home/travis/gopath/src/github.com/wakeful/yaml2json/decode.go:13 +0xd1
main.decode(0x5192c0, 0xc4200765a0, 0xfe00, 0x509160)
/home/travis/gopath/src/github.com/wakeful/yaml2json/decode.go:8 +0x248
main.main()
/home/travis/gopath/src/github.com/wakeful/yaml2json/yaml2json.go:24 +0x18d
colson@MBP-colson:~$ brew tap wakeful/selection
Updating Homebrew...
==> Tapping wakeful/selection
Cloning into '/usr/local/Homebrew/Library/Taps/wakeful/homebrew-selection'...
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 0), reused 5 (delta 0), pack-reused 0
Unpacking objects: 100% (8/8), done.
Tapped 3 formulae (36 files, 28.5KB).
colson@MBP-colson:~$ brew install yaml2json
==> Installing yaml2json from wakeful/selection
==> Downloading https://github.com/wakeful/yaml2json/releases/download/0.3.1/yaml2json-darwin-amd64
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/83977943/25e63980-d11a-11e8-9e2a-a67f08ab855d?X-Amz-Algorithm=AW
######################################################################## 100.0%
Error: An exception occurred within a child process:
ChecksumMismatchError: SHA256 mismatch
Expected: 54dac603087827033e74f9396e220e70a463a5949bfc36ce0e2c445ab41845cb
Actual: 466763d034da7014c8cb4b8208ef0cf750a76a90974f8ddaa717023e413ffa51
Archive: /Users/colson/Library/Caches/Homebrew/downloads/f7dd8de39cb737aee27d42fcfc1c2888c615a2b9adf6831a7264ed6fbd4d6db2--yaml2json-darwin-amd64
To retry an incomplete download, remove the file above.
There's currently an SHA mismatch when trying to install yaml2json with Homebrew.
There is currrently a SHA mismatch
==> Downloading https://gitlab.com/inkscape/inkscape/commit/93ccf03162cd2e46d962822d5507865f3451168c
######################################################################## 100.0%
Error: An exception occurred within a child process:
ChecksumMismatchError: SHA256 mismatch
Expected: 1f037cc29cee8e0c60ab4753d4151741c8170e4849129bac68fdc60925eb971d
Actual: 7ce4f70f1cb03cd0bab7dc94821a89bf71600bd59c763ae0d78c48f33db3d9ac
Archive: /Users/gmuhammadsalahuddin/Library/Caches/Homebrew/downloads/369b021412bac03164fd51cdf072f9e402caea5fabf430466d2d9779d6208a36--93ccf03162cd2e46d962822d5507865f3451168c.diff
To retry an incomplete download, remove the file above.
Hi, thanks for the tool. I'm trying to bake it into a Docker image as part of a CI job, and we run --version
against all binaries we install. Despite
yaml2jsonexpecting
-version` with a single dash, it still gives the expected output.
The problem is that it exits with 2 regardless of whether you use -version
or --version
, which is causing our verification script to fail. I'd expect it to exit 0 as there hasn't been an error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.