I want to convert a .conf file directly to json to pass it to frontend. Is there any way to do this in scala / play? This seems incredibly cumbersome along the path I'm taking now:
val conf: Configuration = play.api.Configuration.apply(ConfigFactory.parseFile(new File("app/assets/strings.conf"))) conf.entrySet.seq.map(t => t._1 -> t._2.unwrapped())
I am tempted to return to JSON, but the HOCON syntax is perfect for our use case. HOCON is basically JSON with fewer brackets and quotes - so the conversion should be very simple. However, I cannot find an easy way to do something like this with play / scala.
source share