1

I am using PlayJsonFormats in my application to parse scala objects to Json format. But it is very memory intensive and cpu consuming. Is there any alternative for it which is less memory intensive and less cpu consuming.

2
  • I haven't made a comparison, but off the top of my head Circe seems like a good candidate.
    – Kraylog
    Commented Dec 27, 2017 at 8:11
  • 2
    Define - very memory intensive and cpu consuming. Commented Dec 27, 2017 at 11:50

1 Answer 1

1

For more efficient parsing & serialization of JSON from UTF-8 bytes to Scala case classes & collections I would recommend jsoniter-scala.

Here are benchmarks that compare it vs. most popular Scala JSON libraries: circe, jackson-module-scala & play-json.

Alter and run them for your messages on your env. or just see results for Scala 2.12.4 with JDK 8 & JDK 9 accordingly.

Not the answer you're looking for? Browse other questions tagged or ask your own question.