-
-
Save pjrt/081674c66cf595ff74b8dcb24f664a3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait JsonParser[A] { | |
def parse(json: Json): JsonResult[A] | |
} | |
object JsonParser { | |
def parse[A](json: Json)(implicit A: JsonParser[A]) = A.parse(json) | |
def deriveInstance[A]: JsonParser[A] = callSomeMacroSystem | |
object auto { | |
implicit def autoInstance[A]: JsonParser[A] = deriveInstance | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment