Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Scala Implicit StackOverflow
case class ModelObject(foo1: String, foo2: String, foo3: String, foo4: String, foo5: String)
case class ApiObject(bar1: String, bar3: String, bar4: String)
object ModelObject {
implicit def toApi(m: ModelObject): ApiObject = {
ApiObject(m.foo1, m.foo3, m.bar1)
ModelObject.toApi(ModelObject("1","2","3","4","5")) // bar1 ?? what ?? StackOverflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.