ScalaPB
Protocol buffer compiler for Scala. (by scalapb)
µPickle
uPickle: a simple, fast, dependency-free JSON & Binary (MessagePack) serialization library for Scala (by lihaoyi)
Our great sponsors
ScalaPB | µPickle | |
---|---|---|
3 | 4 | |
1,282 | 693 | |
0.9% | 0.7% | |
9.0 | 6.7 | |
6 days ago | 6 days ago | |
Scala | Scala | |
Apache License 2.0 | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ScalaPB
Posts with mentions or reviews of ScalaPB.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-08-10.
-
Friction-less scala - Tell us what is causing friction in your day-to-day life with Scala
I've had great experience with ScalaPB and even better with fs2-grpc (which builds on top of ScalaPB).
-
Working with polymorphic data models in a REST API
One way I've solved this is to use Protobuf contracts to serialize json with ScalaPB. They have a way implementing oneof that keeps each object individual and separate. Even if you don't decide to use PB, you can take some inspiration from the implementation.
-
Scala 3.0 serialization
You could try out protocol buffers. Not sure how stable it is, but I noticed they have a Scala3 version of their runtime library. (Disclaimer: I have not tried it out myself)
µPickle
Posts with mentions or reviews of µPickle.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-10-22.
-
Why does Scala seem to be slow at benchmark results?
The upickle library has traditionally had great performance for handling json in Scala apps so is likely to be seen as a safe choice for someone starting a Scala project. It appears though that not just upickle, but other json library projects are having difficulties maintaining their old level of performance when they release using Scala 3's macros. uPickle currently has an open issue where you can see some of these issues: https://github.com/com-lihaoyi/upickle/issues/389 and here you can see the weePickle folks are also having the same performance problems. Looks like things changed up significantly enough between Scala 2 and Scala 3 so that in order to maintain the same functionality they have resorted to using runtime reflection for mapping to/from case classes.
- Preparing for uPickle 2.0.0
-
Updated benchmark results of JSON parsers for Scala - now with results for circe and play-json boosters based on jsoniter-scala.
See here for sample code size numbers (not picking on upickle specifically, it's just what I'm using myself. I've heard similar reports about e.g. circe)
-
[help] Trouble with derivation and generics
A good starting point is the note in MacroImplicits.scala in upickle sources. "derives Writer" for a specific case class Foo simply adds a given Writer[Foo] to a companion object of the same specific class. However, this cannot be done automatically for a trait defining sum type - in this case trait Thing. The required given must be defined manually, and the ones automatically obtained for case classes can be used in it.
What are some alternatives?
When comparing ScalaPB and µPickle you can also consider the following projects:
scodec - Scala combinator library for working with binary data
msgpack - MessagePack serializer implementation for Scala / msgpack.org[Scala]
ScalaBuff - the scala protocol buffers (protobuf) compiler
Pickling
Scrooge - A Thrift parser/generator
Avro4s - Avro schema generation and serialization / deserialization for Scala
validation
Chill - Scala extensions for the Kryo serialization library