See also: https://github.com/PetrosPapapa/ComposerFM/issues/15#issuecomment-537870958 I like this approach: https://medium.com/@kolemannix/type-safe-serialization-in-scala-a55bc513ea30 Need to make this work with uPickle and the Mongo/BSON stuff.