Seralizing a scala object into a JSON at compile time -
i'm looking way serialize defined object json , place in resources directory @ compile-time. what's cleanest way this?
sbt can stuff that:
http://www.scala-sbt.org/0.13/docs/howto-generating-files.html
a macro alternative, setting sbt compile macros in 2 stages, more difficult. also, makes sense if calling such macro should part of application code.
Comments
Post a Comment