Uncategorized

Scala macro annotations: a real-world example

FavoriteLoadingAdd to favorites

TL;DR: github.com/kifi/json-annotation. Also, sign up for Kifi. Scala macros can be a great tool to reduce boilerplate code. For example, Play provides macros for easily creating Json serializers. Given a case class: 1 case class A(field1: Int, field2: String) it is easy to define a serializer inside the companion object: 1 2 3 object A { implicit val format: Format[A] =…
Original post: Scala macro annotations: a real-world example
Source: Kifi