Way to resolve both string and list as a Java list in Typesafe config

96 Views Asked by At

I have a HOCON config file, something like

    foo {
          [
           id: 1
           f: abc
          ],
          [
           id: 2
           f: [xyz , pqr]
          ]
        }

At the backend, I want the field f as a Java list. So wherever the field f is a string, I should be able to convert it to a List. config.resolve() doesn't seem to work here and I need a custom wrapper on top it which I'm unable to think of. Is there any way by which this could be achieved ?

0

There are 0 best solutions below