joutvhu / fixed-width-parser

Fixed Width Parser: parse fixed width string to object and export object to fixed width string
MIT License
15 stars 3 forks source link

Make FixedField#label optional #18

Closed f4lco closed 3 years ago

f4lco commented 3 years ago

Hi there 👋 I think your library is very useful and was wondering if you accept contributions once in a while. Ergonomics are quite good, but I really would like FixedField#label to be optional:

The label of FixedFields should work in the same way as for FixedObject or FixedParam, whose label is optional. If the FixedField label is blank, the parser already assigns the name of the backing field as label, which is a reasonable default.

Thank you for considering this PR.

f4lco commented 3 years ago

Thank you for your swift response. I'll happily await the next release.

I also wanted to let you know that I put up an extension package for this parser with regards to Kotlin. It is still in the very early stages, nonetheless: https://github.com/f4lco/fixed-width-parser-kotlin The package currently contains a reader for Kotlin data classes that are either immutable, or have default values on their parameters, or both.

I'm currently experimenting with readers / writers for enum values that will be a type-safe alternative to FixedOption.

joutvhu commented 3 years ago

New version coming is 1.1.2 😄