Is there an easy way to convert properties with dot notation to json
I.E
server.host=foo.bar
server.port=1234
TO
{
Using lightbend config java library (https://github.com/lightbend/config)
String toHierarchicalJsonString(Properties props) {
com.typesafe.config.Config config = com.typesafe.config.ConfigFactory.parseProperties(props);
return config.root().render(com.typesafe.config.ConfigRenderOptions.concise());
}