You can replace this method body with the following. The only difference is that it doesn't skip json_config[name] when it's not a string, it converts it to a string. Is that required?

    (ENV[name] || (json_config && json_config[name]) || default_val).to_s