A Racc based TOML Ruby parser supporting the 0.4.0 version of the spec.
Tomlrb alternatives and similar gems
Based on the "Parsers" category.
Alternatively, view Tomlrb alternatives based on common mentions on social networks and blogs.
Nokogiri9.5 8.5 L1 Tomlrb VS NokogiriNokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
Oj8.2 8.0 Tomlrb VS OjOptimized JSON
HTML::Pipeline8.1 4.0 L5 Tomlrb VS HTML::PipelineHTML processing filters and utilities
Oga6.1 1.3 L5 Tomlrb VS OgaRead-only mirror of https://gitlab.com/yorickpeterse/oga
Ox5.6 3.1 L1 Tomlrb VS OxRuby Optimized XML Parser
Sablon4.8 0.0 Tomlrb VS SablonRuby Document Template Processor based on docx templates and Mail Merge fields.
ROXML4.3 0.0 L5 Tomlrb VS ROXMLROXML is a module for binding Ruby classes to XML. It supports custom mapping and bidirectional marshalling between Ruby and XML using annotation-style class methods, via Nokogiri or LibXML.
Shale4.0 7.7 Tomlrb VS ShaleShale is a Ruby object mapper and serializer for JSON, YAML and XML. It allows you to parse JSON, YAML and XML data and convert it into Ruby data structures, as well as serialize data structures into JSON, YAML or XML.
HappyMapper2.9 0.0 L5 Tomlrb VS HappyMapperObject to XML mapping library, using Nokogiri (Fork from John Nunemaker's Happymapper)
TOML2.6 0.0 L4 Tomlrb VS TOMLParse TOML. Like a bawss.
Nokolexbor1.6 10.0 Tomlrb VS NokolexborHigh-performance HTML5 parser for Ruby based on Lexbor, with support for both CSS selectors and XPath.
raabro1.2 3.5 Tomlrb VS raabroa Ruby PEG parser library
Tomlib1.1 8.2 Tomlrb VS TomlibTomlib is a fast and standards-compliant TOML parser and generator for Ruby.
CooklangRb0.3 4.4 Tomlrb VS CooklangRbA Cooklang parser in Ruby
DotStrings0.2 8.4 Tomlrb VS DotStringsA parser for Apple strings files (.strings) written in Ruby.
Clean code begins in your IDE with SonarLint
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Tomlrb or a related project?
A Racc based TOML Ruby parser supporting the 1.0.0 version of the spec.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install tomlrb
Tomlrb.parse("[toml]\na = [\"array\", 123]")
Tomlrb.load_file('my_file', symbolize_keys: true)
You can run the benchmark against the only other v0.5.0 compliant parser to my knowledge with
Here are the results on my machine:
Warming up -------------------------------------- emancu/toml-rb 1.000 i/100ms fbernier/tomlrb 17.000 i/100ms Calculating ------------------------------------- emancu/toml-rb 10.630 (±28.2%) i/s - 49.000 in 5.035997s fbernier/tomlrb 181.585 (±24.8%) i/s - 850.000 in 5.019273s Comparison: fbernier/tomlrb: 181.6 i/s emancu/toml-rb: 10.6 i/s - 17.08x (± 0.00) slower
After checking out the repo, run
bin/setup to install dependencies. Then, run
bin/console for an interactive prompt that will allow you to experiment.
Do not forget to regenerate the parser when you modify rules in the
parser.y file using
Run the tests using
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 to create a git tag for the version, push git commits and tags, and push the
.gem file to rubygems.org.
- Fork it ( https://github.com/[my-github-username]/tomlrb/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request
Thanks to @jpbougie for the crash course on the Chomsky hierarchy and general tips.