hjson
yj
hjson | yj | |
---|---|---|
5 | 6 | |
2,629 | 924 | |
0.5% | - | |
4.8 | 3.6 | |
23 days ago | 4 months ago | |
HTML | Go | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
hjson
-
Why the fuck are we templating YAML? (2019)
HJson https://hjson.github.io seems a nice 'in-between' between YAML and JSON without the indentation-based syntax, so closer to the JSON side but with comments and less quotes.
What I don't really get is why the cloud providers / tooling implementors have never drafted up a "YAML-light" that just throws out the rarely-used headache-inducing syntax elements.
-
That's a Lot of YAML
Hjson is very similar to JSON5 but allows quotes to be dropped and can use newlines instead of commas. There are implementations for a lot of different languages, I myself contributed the C++ implementation. I wanted something smaller than Yaml but more lax than JSON, found Hjson to suit my needs perfectly.
https://hjson.github.io/
-
The real reason JSON has no comments
JSONs make terrible config files. If you want to use json-like syntax for config, use hjson instead. It's basically json, but changes it slightly so it better matches human expectations.
-
The YAML Document from Hell
```
YAML and JSON succeeded because they had a clean and predictable, no-nonsense mapping between encoding and object-model after decoding. Probably we should all switch to an almost-yaml format that does away with the peculiarities, and the FANG companies would have the momentum to make that happen.
I personally would like for HJSON (https://hjson.github.io) to see more adoption, but that train has passed...
-
Why?
There’s also json-c and Hjson.
yj
-
That's a Lot of YAML
For anyone looking for such a script, there's some CLIs that make it easy. One is `yq -o props` [1], another way is to use `yq -j` or `yj` [2] to convert to JSON and pipe it to `gron` [3].
[1] https://github.com/mikefarah/yq
[2] https://github.com/sclevine/yj
[3] https://github.com/tomnomnom/gron
- Conversion of HCL to/from JSON
-
Tombl – Easily query .toml files from bash
Also checkout yj[1] which can convert between various formats among toml->json
[1]: https://github.com/sclevine/yj
-
What excites you about being a DevOps engineer?
json is just a subset of yaml. https://github.com/sclevine/yj
- Select, put and delete data from JSON, TOML, YAML, XML and CSV files
-
docker-compose.toml
This requires yj and obviously docker-compose to be on your $PATH. You can use yj to convert your docker-compose.yaml to TOML like this
What are some alternatives?
noyaml - A silly emotional rant about the state of devops tooling/the infrastructure sector in 2018. #noyaml.com
www.yaml.org - The yaml.org website
LIBUCL - Universal configuration library parser
tombl - Easily query TOML files from bash
cuetorials.com - Learn you some CUE for a great good!
flatten-tool - Tools for generating CSV and other flat versions of the structured data
json2jsii - Generates jsii-compatible structs from JSON schemas
rq - Record Query - A tool for doing record analysis and transformation
json-c - https://github.com/json-c/json-c is the official code repository for json-c. See the wiki for release tarballs for download. API docs at http://json-c.github.io/json-c/
flatterer - Opinionated JSON to CSV/XLSX/SQLITE/PARQUET converter. Flattens JSON fast.