config icon indicating copy to clipboard operation
config copied to clipboard

Render option to sort keys

Open mmolimar opened this issue 6 years ago • 3 comments

mmolimar avatar May 15 '18 13:05 mmolimar

Hi @mmolimar,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

lightbend-cla-validator avatar May 15 '18 13:05 lightbend-cla-validator

Note: I have signed CLA.

mmolimar avatar May 15 '18 13:05 mmolimar

The idea to implement this is to allow the API to sort the keys in the order you like setting your custom comparator. In my case, I have to sort these keys in a specific order so that the rendered output has the same output as a template I have expects. For example, in other libs such as spray-json you can set a custom printer to do this (among other things).

mmolimar avatar May 20 '18 04:05 mmolimar

We do not intend to extend the functionality of "Typesafe Config" further. See https://github.com/lightbend/config#maintained-by

ennru avatar Jul 06 '23 08:07 ennru