toml~maiha

TOML parser for Crystal
0.3.0 released
maiha/toml.cr
maiha

crystal-toml

Build Status

A TOML parser for Crystal, compliant with the v0.4.0 version of TOML.

Documentation

Projectfile

deps do
  github "manastech/crystal-toml"
end

Usage

require "toml"

toml_string = %(
  title = "TOML Example"

  [owner]
  name = "Lance Uppercut"
  dob = 1979-05-27T07:32:00Z
)

toml = TOML.parse(toml_string)
puts toml["title"] #=> "TOML Example"

owner = toml["owner"] as Hash
puts owner["name"] #=> "Lance Uppercut"
puts owner["dob"]  #=> "1979-05-27 07:32:00 UTC"
toml:
  github: maiha/toml.cr
  version: ~> 0.3.0
Crystal none

Authors

Dependencies 0

Development Dependencies 0

Dependents 0

Last synced .
search fire star recently