I want to convert a .conf-file directly to json so I can pass it to frontend. Is there a way to do that in scala/play? It seems to be incredibly cumbersome with 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())
// which gives me a Seq[(String, AnyRef)] which cannot be converted with Json, so the path from here is even uglier
I'm tempted to go back to JSON, but the HOCON-syntax is perfect for our use-case. HOCON is basicly JSON with less braces and quotes - so conversion should be very straightforward. Still I can't find a simple way to do anything like it with play/scala.