Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/a248/xtomlj
A Java parser for Tom's Obvious, Minimal Language (TOML).
https://github.com/a248/xtomlj
Last synced: 2 days ago
JSON representation
A Java parser for Tom's Obvious, Minimal Language (TOML).
- Host: GitHub
- URL: https://github.com/a248/xtomlj
- Owner: A248
- License: apache-2.0
- Created: 2021-05-20T01:45:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-21T14:42:23.000Z (over 3 years ago)
- Last Synced: 2024-11-08T17:03:29.604Z (about 2 months ago)
- Language: Java
- Homepage:
- Size: 258 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# xTomlJ: A Java parser for Tom's Obvious, Minimal Language (TOML)
xTomlJ is a complete [TOML](https://github.com/toml-lang/toml) parser with the
following attributes:* Supports the latest TOML specification version (1.0.0-rc.1).
* Provides detailed error reporting, including error position.
* Performs error recovery, allowing parsing to continue after an error.It uses the [ANTLR](https://github.com/antlr/antlr4/) parser-generator and
runtime library.This is a fork from the original project [TomlJ](https://github.com/tomlj/tomlj).
It was created because the original project appears to be inactive.## Usage
Parsing is straightforward:
```java
Path source = Paths.get("/path/to/file.toml");
TomlParseResult result = Toml.parse(source);
result.errors().forEach(error -> System.err.println(error.toString()));String value = result.getString("a. dotted . key");
```## Getting xTomlJ
xTomlJ is published to Maven Central.
To include using Maven:
```xmlio.github.xtomlj
xtomlj
1.1.0```
To include using Gradle: `implementation 'io.github.xtomlj:xtomlj:1.1.0'`
## Links
- [GitHub project](https://github.com/xtomlj/xtomlj)
- [Issue tracker: Report a defect or feature request](https://github.com/xtomlj/xtomlj/issues/new)
- [StackOverflow: Ask "how-to" and "why-didn't-it-work" questions](https://stackoverflow.com/questions/ask?tags=tomlj)