Search code examples
jsonscalaplayframeworkhocon

PlayFramework Configuration - Long Strings


How can I handle very long strings in Play's application.conf? Suppose I have:

my.value.param = "Very very very very long line"

and I want to split long line like

my.value.param = "Very very very "
               + "very long line"

How can I do this using HOCON format? Thanks


Solution

  • From the documentation it appears to not be possible in that way. You could work around it slightly, like this:

    my.value.param = ${my.value.param1} ${my.value.param2}
    my.value.param1="Very very very"
    my.value.param2="very long line"
    

    But this is very ugly, of course. I don't think it was ever the intention to have long strings stored in the configuration.