I am using a HOCON configuration file which also has substitution variables. But in the case of substitution variables, the key is not overridden by another value into the same file. For example, consider the following HOCON config:
{
"x":5
"x":6
"y":{"a":1}
"y":{"a":11}
"z":${y.a}
"z":${y.a}
}
Now when I load this from ConfigFactor.parseURL, the resulted config is:
{"x":6,"y":{"a":11},"z":${y.a},"z":${y.a}}
Here y
has to be resolved, but this does not happen with z
.
Questions:
- What is the reason for this output?
- How could be enabled to resolve "z" as well?