ruby-skyjam
msgpack-tools
Our great sponsors
ruby-skyjam | msgpack-tools | |
---|---|---|
1 | 1 | |
21 | 247 | |
- | - | |
0.0 | 0.0 | |
almost 7 years ago | over 2 years ago | |
Ruby | C++ | |
BSD 3-clause "New" or "Revised" License | GNU General Public License v3.0 or later |
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.
ruby-skyjam
-
JSON with Commas and Comments
I found code generation to be useful in Ruby with protobuf. This:
https://github.com/lloeki/ruby-skyjam/blob/master/defs/skyja...
gives that:
https://github.com/lloeki/ruby-skyjam/blob/master/lib/skyjam...
I would certainly enjoy having a DSL to write descriptive code to validate using JSON schema, but it would be even better if the Ruby definitions could be generated and persisted in Ruby files using that DSL.
Also, storing things in basic hash/array types works, but having dedicated types is useful, so that one can ensure not shoving one kind of hash in place of another unrelated kind of hash.
As for types themselves in general, there's RBS and Sorbet. One could have type definition generation as well for even deeper static and runtime checks.
msgpack-tools
-
JSON with Commas and Comments
I wholeheartedly agree with this idea. In case anyone wants a fast C++ parser for this, RapidJSON [1] has optional support for comments and trailing commas; I actually added trailing comma support to it.
I did this to support hand-writing game data in JSON (e.g. monster stats, campaign dialog scripts) and then converting it to MessagePack at build time [2]. This gives you very high simplicity (e.g. no schemas) and excellent performance.
[1] http://rapidjson.org/
[2] https://github.com/ludocode/msgpack-tools
What are some alternatives?
ujsonin - Micro JSON Input / Reader
tools - Unified developer tools for JavaScript, TypeScript, and the web
asn1c - The ASN.1 Compiler
pbc - A protocol buffers library for C
awesome-json-next - A Collection of What's Next for Awesome JSON (JavaScript Object Notation) for Structured (Meta) Data in Text - JSON5, HJSON, HanSON, TJSON, SON, CSON, USON, JSONX/JSON11 & Many More
json5 - JSON5 — JSON for Humans