toml
Parser and encoder for TOML v1.0.0 (Tom's Obvious, Minimal Language) configuration files.
0.18.0
260K downloads/mo
#744 most downloaded on pub.dev
just95/toml.dart
What this package is like to depend on
Last release 7 months ago
30 Dec 2025
Release timing varies
gaps range from 2 weeks to 1.3 years
Nearly every release is documented
notes for 23 of 23 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
23 releases · first in 2015
2 releases in the last 12 months
see the full history below
Release timeline
23 releases · Jan 2015 to Dec 2025Releases
latest 23-
0.18.030 Dec 2025Release notes
Open source →- Support for TOML [v1.1.0][toml-spec/v1.1.0] has been added.
- Newlines and trailing commas are now allowed in inline tables.
- The seconds part of offset date-times, local date-times and local times is now optional.
- If the seconds part is omitted
TomlPartialTime.secondsis set to0. - If a
TomlPartialTimewithTomlPartialTime.seconds == 0is encoded andTomlPartialTime.secondFractionsis empty, the seconds part is omitted.
- If the seconds part is omitted
- Added escape sequence
\efor the escape character (U+001B). - Added escape sequence
\xHHfor code points in the range ofU+0000toU+00FF.- The encoder will use this type of escape sequence to encode control characters in basic strings and multiline basic strings that do not have a corresponding one letter escape sequence.
- The encoder will now throw a
TomlImpossibleEscapeSequenceExceptioninstead of aTomlInvalidEscapeSequenceExceptionif it encounters a code point that cannot be represented using any supported escape sequence. This can happen for example, when the encoded string contains unpaired UTF-16 surrogate code points.
- Support for TOML [v1.1.0][toml-spec/v1.1.0] has been added.
-
0.17.021 Oct 2025Release notes
Open source →-
Dart 3.8 is now required.
-
Upgraded dependencies.
-
TomlEncodableValueandTomlEncodableKeyare nowinterface classes and must not be extended anymore.- If you have previously extended
TomlEncodableValue, you must now use theimplementskeyword instead ofextends. - If you have previously extended
TomlEncodableKeyand overwrote thetoTomlKeymethod, you must now use theimplementskeyword instead ofextends. - If you have previously extended
TomlEncodableKeyand used the default implementation of thetoTomlKeymethod, you must now mixinTomlEncodableKeyMixininstead of extendingTomlEncodableKey.
- If you have previously extended
-
On the web
TomlDocument.loadnow usespackage:webinstead ofdart:html.- If you handled exceptions from
dart:htmlin your code you now have to handle the corresponding exceptions frompackage:webinstead. - If the web server responds with an HTTP status code that is not in the range of 200-299,
TomlDocument.loadnow throws aTomlUnexpectedHttpStatusException.
- If you handled exceptions from
-
-
0.16.007 Jul 2024Release notes
Open source →- Parsing an invalid local date, local time, local date-time or offset date-time now throws a
TomlInvalidDateTimeExceptioninstead of anArgumentError. - Upgraded dependencies.
- Parsing an invalid local date, local time, local date-time or offset date-time now throws a
-
0.15.007 Dec 2023 -
0.14.005 Mar 2023Release notes
Open source →- Dart 2.18 is now required.
- Upgraded dependencies.
- Added
TomlDocument.loadSyncto load TOML documents synchronously. This new method is not supported on the web.
-
0.13.131 May 2022Release notes
Open source →- Downgraded
metadependency from^1.8.0to^1.7.0for compatibility with Flutter3.0.1.
- Downgraded
-
0.13.030 May 2022Release notes
Open source →- Dart 2.17 is now required.
- Upgraded dependencies.
- Removed dependency on
package:quiverin favor ofpackage:collectionand Dart 2.14'sObject.hashandObject.hashAllmethods.
-
0.12.007 Sep 2021Release notes
Open source →- Dart 2.13 is now required.
- Upgraded dependencies.
- Added support for 1.0.0 compliant version of
toml-testtest suite. - Fixed parsing of multi-line literal and multi-line basic strings with up to two (unescaped) double quotes or single quotes before the closing delimiter.
- Fixed immutability of AST.
The AST is intended to be immutable, but
Listproperties of the AST were only ungrowable not unmodifiable.
-
0.11.018 Apr 2021Release notes
Open source →- Disallowed non-scalar Unicode values when encoding (multiline) basic strings.
- Added
TomlBasicString.canEncodeandTomlMultilineBasicString.canEncode. - The constructors of
TomlBasicStringandTomlMultilineBasicStringmethods throw anArgumentErrorif a string cannot be encoded. - The
TomlBasicString.escapeandTomlMultilineBasicString.escapemethods throw aTomlInvalidEscapeSequenceExceptionif a string cannot be encoded.
- Added
- Fixed
hashCodeandoperator ==of some AST nodes.- Two
TomlDocuments with equal expressions now have the same hash codes. - Two
TomlPartialTimes with equal fractional seconds now have the same hash code. - Two
TomlFloats that both represent ananvalue are now considered equal.
- Two
- Added
TomlSimpleKey.fromfactory method. - Allowed leading and trailing whitespace in
TomlKey.parse. - Fixed
TomlKey.parentKeyforTomlKey.topLevel. - Removed unused getter
TomlArray.itemTypes. - Removed redundant
TomlKeyVisitorinterface. - Improved error messages.
- Upgraded dependencies.
- Disallowed non-scalar Unicode values when encoding (multiline) basic strings.
-
0.10.007 Mar 2021 -
0.9.107 Mar 2021Release notes
Open source →- Fixed pretty-printing of Windows line endings in multiline basic strings.
The
\rin a\r\nsequence is not escaped anymore. A carriage return that is not followed by a line feed is still escaped. - Fixed parsing of multiline basic strings with Windows newlines.
A
\r\nsequence caused a runtime type error in previous releases because it was represented as aListinstead of aStringinternally.
- Fixed pretty-printing of Windows line endings in multiline basic strings.
The
-
0.9.007 Mar 2021Release notes
Open source →- Updated to [v1.0.0][toml-spec/v1.0.0] of the TOML specification.
- Allowed leading zeros in exponent part.
- Allowed heterogeneous arrays.
- Disallowed tables created by dotted key/value pairs to be redefined in
[table]form and vice versa.
- Updated to [v1.0.0][toml-spec/v1.0.0] of the TOML specification.
-
0.8.029 Jan 2021Release notes
Open source →- Updated to [v0.5.0][toml-spec/v0.5.0] of the TOML specification.
- Added binary, octal and hexadecimal integer notation.
- Added special floating point values
infandnan. - Added offset date-times, local date-times, local dates and local times.
- The decoder produces
TomlOffsetDateTime,TomlLocalDateTime,TomlLocalDateorTomlLocalTimevalues. There are methods to mapTomlOffsetDateTimeto aDateTime. To convert the other values toDateTimes, missing information such as date, time or offset has to be provided by the application. - UTC and local
DateTimes are now encoded as offset date-times.
- The decoder produces
- Added support for
BigInts.
- Updated to [v0.5.0][toml-spec/v0.5.0] of the TOML specification.
-
0.7.017 Jan 2021Release notes
Open source →This is a major update that does not only bring along many changes to the internal architecture of the library but also to its public interface.
- Removed the
TomlParserclass. UseTomlDocument.parseandTomlDocument.toMapinstead. - In preparation to support TOML [v0.5.0][toml-spec/v0.5.0] in an upcoming version of the library, the parser is now based on TOML's official ABNF.
- Removed the
TomlEncoderclass. UseTomlDocument.fromMapandTomlDocument.toStringinstead. - Removed the
toml.decoderandtoml.encoderlibraries. You should always use thetomllibrary instead. - Removed the
toml.loaderlibrary as well as thetoml.loader.*libraries. UseTomlDocument.loadinstead. In order to implement a custom loading mechanism, useTomlDocument.parseinstead. - Removed the
yamldependency. JSON and YAML documents cannot be loaded with this package anymore. - Renamed
TomlEncodabletoTomlEncodableValueandtoTomltotoTomlValue. - Added
TomlEncodableKeyinterface. Objects that implement this interface are allowed to be used as keys in hash maps instead of strings. TheirtoTomlKeymethod must return aTomlEncodeableKeyitself or a string that can be used as a TOML key. By defaulttoTomlKeyis implemented viatoTomlValue.
- Removed the
-
0.6.119 Nov 2020 -
0.6.022 May 2020 -
0.5.119 Jun 2017 -
0.5.024 Sep 2016Release notes
Open source →- Removed deprecated
use*ConfigLoaderfunctions. - Improved testing and added support for BurntSushi's [
toml-test][toml-test] suite.
- Removed deprecated
-
0.4.005 Jun 2015Release notes
Open source →- Removed deprecated
toml.browserandtoml.serverlibraries. - Dropped support for
dart_config. There is now a customConfigLoaderinterface with two default implementations. - The
use*ConfigLoaderfunctions are still available for backward compatibility, but are deprecated and will be removed in the next release. Each of theConfigLoaderimplementations has a staticusemethod which you should use instead.
- Removed deprecated
-
0.3.008 Apr 2015Release notes
Open source →- Introduced new
toml.loaderlibrary. - The
toml.browserandtoml.serverlibraries are now deprecated and will be removed in the next release. Use the newtoml.loaderlibrary instead.
- Introduced new
-
0.2.012 Feb 2015Release notes
Open source →- Updated to [v0.4.0][toml-spec/v0.4.0] of the TOML specification.
- Added bare/quoted keys.
- Added inline table syntax.
- Allowed underscores in numbers.
- Removed forward slash as an escapable character.
-
0.1.126 Jan 2015 -
0.1.023 Jan 2015