Releases: Peanuuutz/tomlkt
Releases · Peanuuutz/tomlkt
tomlkt 0.4.0
tomlkt 0.3.7
New
- Add extensions to
(TomlArray|TomlTable).get
for easier access to entries. - Add
TomlArrayBuilder
andTomlTableBuilder
for dynamic construction.- Add
buildTomlArray
andbuildTomlTable
as shorthand. - Add extensions to
(TomlArrayBuilder|TomlTableBuilder).element
for easier population.
- Add
Change
- Now a super-table can be defined after a sub-table without causing
ConflictEntryException
. - Fix a bug in
TomlElementEncoder
whereTomlElement
family does not bypass the encoding process withencodeTomlElement
. - Major performance improvement in
TomlElementParser
(originallyTomlFileParser
).
tomlkt 0.3.6
New
- Add
(TomlArray|TomlTable).annotations
for storing metadata (@SerialInfo
annotations).- Add
(TomlArray|TomlTable).(annotated|annotatedAll)
extensions for adding metadata manually.
- Add
- 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
andEmptyArrayOfTableInMapException
don't exist anymore. - Fix a bug in table-like encoding when an empty array of table is after a table-like.
- Now
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
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 ofTomlWriter
.
- Add
tomlkt 0.3.4
Change
- Fix a bug in
\r
decoding. (#51)
tomlkt 0.3.3
New
- Add
TomlReader
for sequential parsing.- Add
TomlStringReader
,TomlNativeReader
(JVM) as implementation. - Add
Toml.parseToTomlTable(TomlReader)
,Toml.decodeFromReader
,Toml.decodeFromNativeReader
(JVM) for convenience.
- Add
- Add
TomlNativeWriter
(JVM) andToml.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 theToml
instance. - Add contracts in various type checks.
Change
- Fix a bug in
TomlLiteral
toDouble
conversion.
tomlkt 0.3.2
New
- Add official JSON format like polymorphism serialization.
- Add
TomlConfigBuilder.classDiscriminator
and@TomlClassDiscriminator
for changing the key of the class discriminator.
- Add
- Add support for accessing values of a TomlArray by index in
TomlTable.get(keys)
. - Add a
Toml.decodeFromString
overload withkeys
parameter for only deserializing a certain part of a TOML file. - Add
TomlArray(values)
andTomlTable(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
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 ofasTomlXxx()
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
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
KSerializer
s for date time types. Also addTomlLocalDateTime
,TomlOffsetDateTime
,TomlLocalDate
,TomlLocalTime
as aliases to those raw types mentioned above binding with corresponding serializers.
- Add
Change
- Remove
@Fold
,@Multiline
,@Literal
,@Comment
. - Remove
TomlConfigBuilder.checkArrayInMap
. - Deprecate
TomlInteger.Base.XXX
in favor ofBase.Xxx
. (Unify singleton style) - Random performance improvements.