Hi Art, I have to check what I did (I don't remember ;)) but I don't think so. Even if you use nested objects, they won't be loaded in config admin service.
You can find some examples here https://github.com/apache/karaf/tree/main/config/src/test/resources. It reminds me to add documentation about config json format. I will. Thanks, Regards JB On Thu, Mar 10, 2022 at 6:18 PM Arthur Naseef <artnas...@apache.org> wrote: > Thanks - I'll try that workaround. Do JSON files for config support > nested objects? > > Art > > On Tue, Mar 8, 2022 at 12:56 AM Jean-Baptiste Onofré <j...@nanthrax.net> > wrote: > >> Hi, >> I guess it's because Karaf json config service takes it. >> Maybe, if you don't use the json config for Karaf, you can exclude json >> suffix, aka in etc/config.properties, you can change the filter: >> >> felix.fileinstall.filter = .*\\.(cfg|config|json) >> >> to something like: >> >> felix.fileinstall.filter = .*\\.(cfg|config|jsoncfg) >> >> Like this, json file should not be modified (I gonna try but it should do >> the trick). >> >> Regards >> JB >> >> On Mon, Mar 7, 2022 at 11:04 PM Arthur Naseef <artnas...@apache.org> >> wrote: >> >>> Using Karaf 4.3.6 with keycloak, which uses a JSON configuration file in >>> the Karaf ETC folder. >>> >>> On startup of Karaf, the JSON file is incorrectly rewritten. Looks like >>> this happens to any JSON file placed in that folder. For example: >>> >>> *etc/test.json* >>> >>> { >>> "field1": { >>> "sub-field-A": 1, >>> "sub-field-B": 2 >>> } >>> } >>> >>> >>> After starting karaf: >>> >>> { >>> "field1":"{\"sub-field-A\":1,\"sub-field-B\":2}" >>> } >>> >>> >>> The reformatting breaks keycloak, which makes sense since it turned a >>> structure into a string. Any help is appreciated. >>> >>> Art >>> >>