toml.cr:适用于Crystal的TOML解析器

时间:2021-05-24 08:53:28
【文件属性】:
文件名称:toml.cr:适用于Crystal的TOML解析器
文件大小:46KB
文件格式:ZIP
更新时间:2021-05-24 08:53:28
Crystal toml.cr 适用于的解析器,符合TOML v0.4.0版本。 安装 将此添加到应用程序的shard.yml : dependencies : toml : github : crystal-community/toml.cr branch : master 用法 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[ "

网友评论