TheElectronWill / night-config

Powerful java configuration library for toml, yaml, hocon, json and in-memory configurations. Serialization/deserialization framework.
GNU Lesser General Public License v3.0
242 stars 28 forks source link

Supporting records #159

Closed brainbytes42 closed 8 months ago

brainbytes42 commented 9 months ago

Hi, are there any plans to support java records as ObjectConverter-targets? As they don't have an empty constructor, currently this seems not possible?

TheElectronWill commented 9 months ago

Hello!

Records aren't supported out-of-the box for now, but you could try to add a custom conversion. It should be possible to modify the ObjectConverter to support records, I have to think about a way of handling newer versions of Javas at the same time as Java 8.

Some links for my future self who will implement that feature:

TheElectronWill commented 8 months ago

Okay, I'm onto something with multi-release-jars. Serialization and deserialization of records is working with the new serde package of #163 :tada:

brainbytes42 commented 8 months ago

sounds promising - I'm looking forward to it :-)

brainbytes42 commented 8 months ago

You seemed to be very active on this project recently 👍👍 - any plans for a new release? 😊

TheElectronWill commented 8 months ago

Yes, I've already written the draft of the new release actually :) I'll release it once #164 is done.