kotlinx.serialization
protobuf-es
Our great sponsors
kotlinx.serialization | protobuf-es | |
---|---|---|
52 | 7 | |
5,088 | 927 | |
1.4% | 4.6% | |
8.5 | 9.2 | |
6 days ago | 5 days ago | |
Kotlin | TypeScript | |
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.
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
-
kotlinx-serialization won't serialize a List?
Regardless, I followed the documentation to register List for polymorphic serialization and my static code analysis does not seem to be happy with it.
-
Is rust serde unique?
I think kotlinx.serialization might come close, but looks like custom Encoders and Decoders are still experimental.
-
[Android/Multiplatform] Kotlin Flows + Ktor = Flawless HTTP requests (- ArrowKt)
This example will not work on a multiplatform project. you are using gson, gson runs only on jvm, you should use https://github.com/Kotlin/kotlinx.serialization for the json parsing
-
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
-
Question about app weight... I want to use Apache commons math3, should I fork it and "crop" it to reduce compile times and app weight?
Fun fact, kotlinx.serialization had a release just recently which makes it come with some bundled proguard rules to make this experience easier. Yes you'll still have issues if you're using things via reflection and try to serialize things that proguard deemed unused and removed them, but it's a step forward https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.5.0-RC
-
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
protobuf-es
-
gut: convert golang structs to typescript interfaces
Yes, you can. You are mistaking protobuf with gRPC. See this for more information.
-
TypeScript type safety with GO
You can use this with connect: https://github.com/bufbuild/protobuf-es
-
Ask HN: Why isn't JSON-RPC more widely adopted?
Ah you should check out https://github.com/bufbuild/protobuf-es which feels great so far. Then there's connect by the same buf people but it has a grpc-web option https://connect.build/docs/web/getting-started/. The amount of code generated is also tiny, which I love.
-
Connect-Web: ergonomic Protobuf & gRPC for browsers
I'd recommend looking into protobuf-ts (Timo from Buf) or protobuf-es (Buf maintained).
-
Connect-Web: It's time for Protobuf/gRPC to be your first choice in the browser
Not sure if it is a magic bullet, but it was definitely written by TypeScript developers, for TypeScript developers.
The generated TypeScript code is already pretty minimal because all serialization ops are implemented with reflection instead of generated code (which is only marginally slower than generated code in JS).
But you can also switch to generating JavaScript + TypeScript declaration files, which is truly minimal: JavaScript is an entire dynamic language, so we actually only generated a small snippet of metadata in the .js output, and create a class at run time with a function call. The generated typings (.d.ts) give you type safety, autocompletion in the IDE, and so on.
You can see the output here: https://github.com/bufbuild/protobuf-es/blob/main/packages/p...
- Connect: A Better gRPC
What are some alternatives?
jackson-module-kotlin - Module that adds support for serialization/deserialization of Kotlin (http://kotlinlang.org) classes and data classes.
ts-proto - An idiomatic protobuf generator for TypeScript
Moshi - A modern JSON library for Kotlin and Java.
connect-go - Moved to https://github.com/connectrpc/connect-go
klaxon - A JSON parser for Kotlin
bloomrpc - Former GUI client for gRPC services. No longer maintained.
Gson - A Java serialization/deserialization library to convert Java Objects into JSON and back
protobuf-ts - Protobuf and RPC for TypeScript
spring-native - Spring Native is now superseded by Spring Boot 3 official native support
grpcurl - Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers
kotlin-json - A JavaScript Object Notation library for Kotlin JVM.
connect-es - The TypeScript implementation of Connect: Protobuf RPC that works.