mschuetz / toml

A TOML parser for Java based on ANTLR 4

Home Page:https://mschuetz.github.io/toml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A TOML Parser for Java

A TOML parser for Java powered by ANTLR 4. Build Status

As of this writing, it successfully parses the parts of hard_example.toml 473c4a85 that should work.

Usage Example:

import es.wobbl.toml.Toml;

// Parsing
KeyGroup root = Toml.parse(new FileInputStream("example.toml"));
String ip = root.getString("servers.alpha.ip");
List<Long> ports = root.getList("database.ports", Long.class);

// Serialization
root.toToml(new FileWriter("/tmp/foo.toml"));

MIT License

Copyright (c) 2013 Matthias Schütz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A TOML parser for Java based on ANTLR 4

https://mschuetz.github.io/toml


Languages

Language:Java 86.9%Language:ANTLR 7.7%Language:Groovy 5.4%