An object graph solution perhaps? : https://codesolvent.com/configr/

You can go from data format (yaml,json,xml, property file...etc) to object graph and the reverse.