crystal-toml

forked from crystal-community/toml.cr
TOML parser for Crystal

crystal-toml

Build Status docrystal.org

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

Installation

Add this to your application's shard.yml:

dependencies:
  toml:
    github: manastech/crystal-toml
    branch: master

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"
Repository

crystal-toml

Owner
Statistic
  • 0
  • 0
  • 0
  • 1
  • 0
  • almost 7 years ago
  • December 27, 2017
License

Links
Synced at

Thu, 07 Nov 2024 09:12:50 GMT

Languages