Wednesday 21 November 2018

Scala, Play and json - no boilerplate with Circe vs play-json, but is it faster?

If you don't like typing things about your case classes that Scala compiler can do for you, think about json library Circe. You may like to read something about Circe first, like this reddit post, or perhaps just make your mind by jumping to code and see how these things works.

If you would like to try Circe in your project, all you need is play-circe and extend your controller with one more trait.

I run simple benchmarks to see if there is any significant difference, probably these cases are too simple, but I cannot say any of them is faster.

Feel free if you would like to extend these cases, https://github.com/codesurf42/scalaPlayJsonCirce