Skip to content

Releases: Peanuuutz/tomlkt

tomlkt 0.4.0

16 Jun 12:09
2fe147e
Compare
Choose a tag to compare

Change

  • Remove all the deprecated declarations.
  • Upgrade to Kotlin 2.0.0, also upgrade kotlinx.serialization to 1.7.0, kotlinx.datetime to 0.6.0. (#66, #67)

tomlkt 0.3.7

16 Oct 16:10
ddeaf63
Compare
Choose a tag to compare

New

  • Add extensions to (TomlArray|TomlTable).get for easier access to entries.
  • Add TomlArrayBuilder and TomlTableBuilder for dynamic construction.
    • Add buildTomlArray and buildTomlTable as shorthand.
    • Add extensions to (TomlArrayBuilder|TomlTableBuilder).element for easier population.

Change

  • Now a super-table can be defined after a sub-table without causing ConflictEntryException.
  • Fix a bug in TomlElementEncoder where TomlElement family does not bypass the encoding process with encodeTomlElement.
  • Major performance improvement in TomlElementParser (originally TomlFileParser).

tomlkt 0.3.6

14 Oct 11:54
9689e08
Compare
Choose a tag to compare

New

  • Add (TomlArray|TomlTable).annotations for storing metadata (@SerialInfo annotations).
    • Add (TomlArray|TomlTable).(annotated|annotatedAll) extensions for adding metadata manually.
  • Add linuxArm64 target. (#56)

Change

  • Refactor encoding process.
    • Now TomlElementEncoder will transfer @SerialInfo annotations from properties to (TomlArray|TomlTable).annotations.
    • Now all the tables and array of tables will be encoded as non-inline eagerly (as long as it is not annotated with @TomlInline).
    • Now NullInArrayOfTableException and EmptyArrayOfTableInMapException don't exist anymore.
    • Fix a bug in table-like encoding when an empty array of table is after a table-like.
val table = TomlTable(
    "string" to TomlArray(
        TomlTable(
            1 to true
        ),
        TomlTable(
            'c' to Float.POSITIVE_INFINITY
        )
    ),
    "key" to TomlTable(
        false to 114514L
    ),
    1.0 to null
)

Toml.encodeToString(table)
/*
"1.0" = null

[key]
false = 114514

[[string]]
1 = true

[[string]]
c = inf
 */

tomlkt 0.3.5

05 Oct 10:51
fbaa95e
Compare
Choose a tag to compare

New

  • Add TomlInteger.group for grouping digits.
  • Add TomlConfigBuilder.uppercaseInteger for uppercasing letters in integers.
  • Enhance TomlWriter with more functions for better control over encoding.
    • Add AbstractTomlWriter as basic implementation of TomlWriter.

tomlkt 0.3.4

02 Oct 12:50
2c36dde
Compare
Choose a tag to compare

Change

  • Fix a bug in \r decoding. (#51)

tomlkt 0.3.3

29 Sep 13:12
68df7fd
Compare
Choose a tag to compare

New

  • Add TomlReader for sequential parsing.
    • Add TomlStringReader, TomlNativeReader (JVM) as implementation.
    • Add Toml.parseToTomlTable(TomlReader), Toml.decodeFromReader, Toml.decodeFromNativeReader (JVM) for convenience.
  • Add TomlNativeWriter (JVM) and Toml.encodeToNativeWriter (JVM) for better JVM integration.
  • Add TomlContentPolymorphicSerializer for polymorphic serialization without class discriminator.
  • Add TomlConfig.explicitNulls so that during encoding any entry with null value is ignored and during decoding any nullable property without default value is set to null automatically.
  • Add TomlEncoder.toml, TomlDecoder.toml for referring to the Toml instance.
  • Add contracts in various type checks.

Change

  • Fix a bug in TomlLiteral to Double conversion.

tomlkt 0.3.2

14 Sep 05:22
89a7c5c
Compare
Choose a tag to compare

New

  • Add official JSON format like polymorphism serialization.
    • Add TomlConfigBuilder.classDiscriminator and @TomlClassDiscriminator for changing the key of the class discriminator.
  • Add support for accessing values of a TomlArray by index in TomlTable.get(keys).
  • Add a Toml.decodeFromString overload with keys parameter for only deserializing a certain part of a TOML file.
  • Add TomlArray(values) and TomlTable(entries) overloads to reduce the redundance when creating instances manually.

Change

  • Fix a bug in nested table encoding when the super-table is structured and the sub-table is unstructured.
  • Unify class and object serialization.
  • Major refactor in encoders and decoders.

tomlkt 0.3.1

08 Sep 15:18
c451f08
Compare
Choose a tag to compare

New

  • Add TomlLocalDateTimeSerializer(), TomlOffsetDateTimeSerializer(), TomlLocalDateSerializer(), TomlLocalTimeSerializer() to retrieve the default serializers for native date time formats.
  • Add support for value classes, unsigned integers and unsigned integer arrays.
  • Add support for both \u0000 and \U00000000.

Change

  • Deprecate toTomlXxx() in favor of asTomlXxx() to better reflect the intent.
  • Fix a bug when encoding special floating point numbers, specifically nan and infinity.
  • Fix a bug when encoding empty array of table in a class.
  • Fix a bug when parsing date time string with both T separator and a trailing space.
  • Fix a bug when parsing multiline strings. (#37)
  • Fix a bug when parsing double-quoted strings with the final character being \.
  • Fix several bugs in TomlElementDecoder so that calling decodeNotNullMark() multiple times on a CompositeDecoder won't end up populating new items.
  • Random performance improvements.

tomlkt 0.3.0

01 Sep 10:08
86c170c
Compare
Choose a tag to compare

New

  • Add support for date time.
    • Add NativeLocalDateTime, NativeOffsetDateTime, NativeLocalDate, NativeLocalTime as raw date time types, which are mapped to platform-specific types (See README for detail).
    • Add builtin KSerializers for date time types. Also add TomlLocalDateTime, TomlOffsetDateTime, TomlLocalDate, TomlLocalTime as aliases to those raw types mentioned above binding with corresponding serializers.

Change

  • Remove @Fold, @Multiline, @Literal, @Comment.
  • Remove TomlConfigBuilder.checkArrayInMap.
  • Deprecate TomlInteger.Base.XXX in favor of Base.Xxx. (Unify singleton style)
  • Random performance improvements.