tree: 894371f5f2bffc89f67af5374c8324d0a72184bc [path history] [tgz]
  2. build.gradle
  3. src/

Tuweni-Toml: TOML parser for Java/Kotlin

Tuweni-Toml is a complete TOML parser with the following attributes:

  • Supports the latest TOML specification version (0.5.0).
  • 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.


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");


Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.