How to parse a json string to a case class in scaja.js and vice versa
Use one of the pickling libraries that work with Scala.js. The following two produce well-behaved and predictable JSON:
- uPickle
- Prickle
Circe
has more than 1000 stars:
https://github.com/circe/circe
More safe and efficient options are:
- AVSystems GenCodec
- Borer
- jsoniter-scala
Bellow are results of benchmarks for parsing and serialization of a message sample from the Twitter API: