http4k
kotlinx.serialization
Our great sponsors
http4k | kotlinx.serialization | |
---|---|---|
5 | 52 | |
2,488 | 5,074 | |
0.6% | 1.1% | |
9.8 | 8.5 | |
7 days ago | 7 days ago | |
Kotlin | Kotlin | |
Apache License 2.0 | Apache License 2.0 |
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.
http4k
-
What's the state of server-side frameworks with Kotlin support today for small teams?
You named Express as an example for a good framework - I'd say both http4k and ktor come close to it. Spring Boot would really be on the other end and I met lots of JS/TS devs that didn't even want to touch it. I did have the same impression than you though: Documentation for ktor is not great at all.
- Jackson, moshi or kotlinx.serialization?
-
Application-as-a-Function Thinking
I couple of years ago I was lucky to use http4k, a server as a function web library for Kotlin. It was such a wonderful change compared to every other technologies available in both Java and Kotlin. It's simple.
Testing becomes so much easier too, as one can instantiate a the whole web routing aspect, without having to bind it to a port and having to send real http requests.
If strongly suggest people to take a look at it. It's not perfect, but it's a lot simpler than other frameworks and libraries. And it's a shift in some of the current mentality of using heavy frameworks (such as spring boot) which blow up anyone's cognitive load.
-
How is the market for Kotlin developers where you live?
http4k with the contract, format-jackson, and server-undertow modules
kotlinx.serialization
-
How would I serialize a JSON primitive to a class?
Have you tried this:? https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/serializers.md
It might be possible with a value class
-
Is rust serde unique?
I think kotlinx.serialization might come close, but looks like custom Encoders and Decoders are still experimental.
-
Why should I use kotlinx.serialization?
This is the issue to +1 https://github.com/Kotlin/kotlinx.serialization/issues/1931
- Generate Kotlin client for a complex web API
-
Modern Android Development in 2023
Kotlin Serialization
-
Apple's Swift rewrite of its Foundation framework will be open source
Kotlin Serialization is also a newer option, but doesn't have as much traction.
-
Jackson, moshi or kotlinx.serialization?
``` see the docs
-
Connect-Web: It's time for Protobuf/gRPC to be your first choice in the browser
It makes sense for some use cases but the vast majority of use cases, parsing overhead is simply not a concern. Mobile phones are fast, networks have plenty of bandwidth (and the savings are marginal), parsers are pretty good.
But done right, binary protocols are sometimes worth the marginal savings they provide. We switched over one of our APIs to use CBOR instead of json. It's a search API that we hit a lot and I wanted to cut down on the bytesize of the responses a little. The savings are not that impressive. But I'll take 10% when i can get it.
Otherwise, this was a pretty simple change. We use kotlinx serialization in a multi-platform library. Basically, all we did is configure it to use CBOR instead of json. https://github.com/Kotlin/kotlinx.serialization/blob/master/... Half hour job. Haven't looked at it since; just works. It supports protobuf as well but it looked like more hassle to set up so we went with CBOR instead.
-
FP for web/mobile apps in 2022?
I'm very much with you on kotlinx.serialization's pain points. And unfortunately, there just doesn't seem to be much of a willingness to fix them. They seem very tied to their polymorphic/contextual serialization model, despite all the problems it causes.
What are some alternatives?
jackson-module-kotlin - Module that adds support for serialization/deserialization of Kotlin (http://kotlinlang.org) classes and data classes.
ktor - Framework for quickly creating connected applications in Kotlin with minimal effort
Moshi - A modern JSON library for Kotlin and Java.
klaxon - A JSON parser for Kotlin
javalin - A simple and modern Java and Kotlin web framework [Moved to: https://github.com/javalin/javalin]
Gson - A Java serialization/deserialization library to convert Java Objects into JSON and back
spring-native - Spring Native is now superseded by Spring Boot 3 official native support
voyager-server-spring-boot-starter - Easily create REST endpoints with permissions (access control level) and hooks includeded
kotlin-json - A JavaScript Object Notation library for Kotlin JVM.
vertx-lang-kotlin - Vert.x for Kotlin
kotlinx.html - Kotlin DSL for HTML
compose-multiplatform - Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.