gestalt-config/gestalt

support case sensative paths

credmond-git opened this issue · 2 comments

Currently the path normalizer converts everything into lower case.
Add support for customzing the path normalizer so people can provide a normalizer that doesnt change anything to support case sensative paths.

 Gestalt gestalt = new GestaltBuilder()
            .addSource(MapConfigSourceBuilder.builder().setCustomConfig(configs).build())
            .useCacheDecorator(false)
            // do not normalize the sentence return it as is.
            .setSentenceLexer(new PathLexer(".", DEFAULT_EVALUATOR, (it) -> it))
            .build();

If you set a new lexer that is for example case-sensitive, when you decode an object
public record Person(String name, Integer id) if in the properties it is admin.Name = sarah
it will not be able to decode as the name field is lower case and the property is upper case.