Another potential option, is Lightbend Config
https://github.com/lightbend/config
It adds includes/inheritance, substitutions, unit of measure parity , comments , and few other things -- on top of JSON.
does not have if-logic, loops, or arbitrary functions, however.
On plus side, the library is available in a number of languages, easily embeddable. And there is an IntelliJ plugin for it, to color the syntax of the config files.