okio
kotlinx.serialization
Our great sponsors
okio | kotlinx.serialization | |
---|---|---|
15 | 52 | |
8,640 | 5,063 | |
0.5% | 2.2% | |
8.9 | 8.5 | |
10 days ago | 1 day 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.
okio
-
Is it a good idea to use Google Guava library for Android development?
I am involved in the development of Android application which is a rather "thick" mobile client for a Web service. It heavily communicates with the server but also has a lot of inner logic too. So, I decided to use some features of Google Guava library to simplify development process. Here is a list of features I'm very interested in: immutable collections, base utils, collection extensions, functional programming sugar and idioms (common.collect and common.base), primitives utilities (common.primitives), hashing utilities (common.hash), concurrent utils (futures and AsyncFunction). Things I don't want to use in Android: common.cache (see question below), common.eventbus (we have better Android specific libs for this, such as Otto), common.io (we can use okio for Android now).
-
Why tools have Kotlin native to work with bytes?
Yeah Kotlin's own standard library is a lot smaller than Java's currently so you'll need to use something third-party for this. Okio is a popular option https://square.github.io/okio/ it has a Buffer type which is pretty similar to Java's ByteBuffer
-
can I access and manipulate the iOS filesystem with kotlin multiplatform?
Use okio, it is Multiplatform now. I use this for my own library KStore
-
Windows Central: "Microsoft to merge Surface Pro X ARM and Surface Pro 9 Intel versions under one product line"
For networking, file IO, and streams in general, there's Korio and for Java; for just networking, there's LiteNetLib for C#; for what looks like data streams in general, there's Okio also for Java; and Tokio for multi-threaded IO in Rust.
-
Porting C++ code to Kotlin (ISO 15765-2)
Okio is nice for input/output streams, and sockets.
-
Kotlin/native: library for file io?
Sounds like you want https://square.github.io/okio/
Try OKIO: https://github.com/square/okio/
- Are there any libraries well suited to the manipulation of bits, bytes and byte arrays used in packet communication?
-
Kotlin Team AMA #3: Ask Us Anything
On JVM, there is plenty of existing solution already on for multiplatform uses I'd suggest checking amazing Okio library by Square, that seems to cover most of basic use-cases.
- 60% of school apps are sending student data with third parties without consent
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.
Moshi - A modern JSON library for Kotlin and Java.
klaxon - A JSON parser for Kotlin
Gson - A Java serialization/deserialization library to convert Java Objects into JSON and back
OkHttp - Square’s meticulous HTTP client for the JVM, Android, and GraalVM.
spring-native - Spring Native is now superseded by Spring Boot 3 official native support
kotlin-json - A JavaScript Object Notation library for Kotlin JVM.
compose-multiplatform - Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
kotlinx-datetime - KotlinX multiplatform date/time library
koin - Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
kotlinx.coroutines - Library support for Kotlin coroutines
xmlutil - XML Serialization library for Kotlin