Replies: 2 comments 8 replies
-
I would try and include circe, it may not be the fastest but its used heavily in the Scala ecosystem and is actively maintained. Also another thing to note about pekko-stream-circe is its a pure streaming implementation that uses jawn's This means that in terms of raw throughput its always going to lose compared to other JSON parsers, but it will have advantageous if you are dealing with extremely large JSON payloads (i.e. very large arrays). |
Beta Was this translation helpful? Give feedback.
-
@plokhotnyuk you wrote the akka-http-jsoniter-scala code on which pekko-http-jsoniter-scala - do you think that code can stream large inputs and outputs? Many of the other JSON libs are not purely streaming under the hood and jsoniter-scala appears to be a streaming first solution. |
Beta Was this translation helpful? Give feedback.
-
Spray-JSON is not causing any problems but it is not actively maintained.
We could deprecate pekko-http-spray-json and provide an alternative. In terms of active maintenance and performance, it would appear that jsoniter-scala would be a good choice.
Other options include
I guess Circe is an option but it is not as performant as the others (there is a jsoniter-scala booster though that seems to help improve Circe writes).
Feel free to suggest alternatives.
For jsoniter-scala, jackson and circe, we have https://github.com/pjfanning/pekko-http-json but it would require that we a Software Grant from Roland Kuhn (because pekko-http-json is forked from akka-http-json) and some CLAs signed.
For Circe, we also have https://github.com/mdedetrich/pekko-streams-circe
One of the main issues is that we use pekko-http-spray-json in many pekko-connectors as well as in some of the discovery modules in pekko-management. If we have an alternative to pekko-http-spray-json, we can switch these usages to the alternative. It does feel like we should use Apache Pekko maintained libs for these use cases.
Some perf comparisons: https://plokhotnyuk.github.io/jsoniter-scala/
Beta Was this translation helpful? Give feedback.
All reactions