skylark
hjson-js
skylark | hjson-js | |
---|---|---|
1 | 9 | |
1,184 | 404 | |
- | 0.5% | |
0.0 | 0.0 | |
about 5 years ago | 3 months ago | |
Go | JavaScript | |
BSD 3-clause "New" or "Revised" License | MIT License |
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.
skylark
-
YAML and Configuration Files
My stance is that YAML is a good format for configuration management and generation -- it's wonderful at filling gaps as your deployment model increases in complexity to provide a mechanism to "render" your configuration -- much like Skylark [1] does (derived from Google's internal GCL).
YAML ends up being a powerfully declarative model [2] for the state of a data structure, rather than a straight representation, ironically often enough being used in turn for an imperative model like in Ansible [3]. Definitely friendlier than JSON. But personally, I really like YAML because it lets me compose using a traits/mixins-like model using & and , which allows for verbose, structured configuration inputs but concise configuration files.
docker-compose YAML files extension fields [4], imo, are a great example of this type of model in action. When you leave this much pre-deserialization flexibility in your configuration representation, it makes building cool stuff like docker-compose ECS support x-aws- extension keys [5] and other plugin system-type capabilities much more straightforward than, for example, adding a new language feature to HCL.
[1]: https://github.com/google/skylark
hjson-js
-
[OC] No comments
By the way.. if you use the hjson parser you can add comments to json files :) https://hjson.github.io/
- YAML vs. JSON
-
In a symfony interview I got asked "but why json? XML is better"
I wish this took off https://hjson.github.io. I like it much more than yaml.
-
policy generator?
I don't know anything about VueJS either but HJSON is pretty cool in that regard https://hjson.github.io/
-
Keeping documentation in sync with source code
> Another difficult problem was checking for correct indentation visually (because the configuration is YAML-based and indentation matters).
why yaml? I hate it so much! my eyes hurt looking at it?
why not using https://hjson.github.io/ ?
-
JSON5 Data Interchange Format
HJSON [0] is also another format that tries to make it easier for humans to read / write json.
[0] https://hjson.github.io/
-
YAML and Configuration Files
well there are json alternatives which fit this bill, such as HJSON.
https://hjson.github.io/
might not be as "common" but it has good implementations for many languages.
-
zdpack - A tool for merging and converting Minecraft data and resource packs.
zdpack also pre-processes datapacks, allowing json files to be written in hjson or yaml, in addition to allowing a special extensible super-set of MCFunction I call CommandScript. You can check the github page for a quick overview of CommandScript.
- The Goals of XML at 25: and the one change that XML now needs
What are some alternatives?
yaml-rust - A pure rust YAML implementation.
Lowdb - Simple and fast JSON database
libyaml - Canonical source repository for LibYAML
json5 - JSON5 — JSON for Humans
ytt - YAML templating tool that works on YAML structure instead of text
Knex - A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use.
cue - The home of the CUE language! Validate and define text-based and dynamic configuration
NeDB - The JavaScript Database, for Node.js, nw.js, electron and the browser
buckets - A complete, fully tested and documented data structure library written in pure JavaScript.
strictyaml - Type-safe YAML parser and validator.
schemapack - Create a schema object to encode/decode your JSON in to a compact byte buffer with no overhead.