tomlj

A parser for Tom's Obvious, Minimal Language (TOML).

License

License

GroupId

GroupId

org.tomlj
ArtifactId

ArtifactId

tomlj
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

pom
Description

Description

tomlj
A parser for Tom's Obvious, Minimal Language (TOML).
Project URL

Project URL

https://github.com/tomlj/tomlj
Source Code Management

Source Code Management

https://github.com/tomlj/tomlj

Download tomlj

How to add to project

<!-- https://jarcasting.com/artifacts/org.tomlj/tomlj/ -->
<dependency>
    <groupId>org.tomlj</groupId>
    <artifactId>tomlj</artifactId>
    <version>1.0.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.tomlj/tomlj/
implementation 'org.tomlj:tomlj:1.0.0'
// https://jarcasting.com/artifacts/org.tomlj/tomlj/
implementation ("org.tomlj:tomlj:1.0.0")
'org.tomlj:tomlj:pom:1.0.0'
<dependency org="org.tomlj" name="tomlj" rev="1.0.0">
  <artifact name="tomlj" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.tomlj', module='tomlj', version='1.0.0')
)
libraryDependencies += "org.tomlj" % "tomlj" % "1.0.0"
[org.tomlj/tomlj "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.antlr : antlr4-runtime jar 4.7.2
com.google.code.findbugs : jsr305 jar 3.0.2

Project Modules

There are no modules declared in this project.

TomlJ: A Java parser for Tom's Obvious, Minimal Language (TOML)

TomlJ is a complete 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 parser-generator and runtime library.

Usage

Parsing is straightforward:

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 TomlJ

TomlJ is published to a Maven and JCenter.

To include using Maven:

<dependency>
  <groupId>org.tomlj</groupId>
  <artifactId>tomlj</artifactId>
  <version>1.0.0</version>
</dependency>

To include using Gradle: compile 'org.tomlj:tomlj:1.0.0'

Snapshot versions are also published to the bintray repository.

Links

org.tomlj

TomlJ

Versions

Version
1.0.0