What do you guys use for mongodb in your ktor apps...
# ktor
b
What do you guys use for mongodb in your ktor apps?
m
b
Looks like kmongo is more of what I need. Your lib is missing object mapping/serialization 😕
m
You’ll have to write your own codecs. I’ve used KMongo before and got rid of it because they convert everything to intermediary JSON and that led to many bugs. I also didn’t like their library API.
But that was a year ago
I’ve got to write a compiler plugin that creates all these codes 🙂
b
Odd, can;t find any mentions of having to write codecs on their docs
Ah, since v3.11.2 they've added kotlinx.serialization support which "generates" the codecs i guess
m
No, I mean in my library I write codecs
You can’t really created codecs from kotlinx.serialization.
You can only use some JSON intermediary as crutch.
Codecs are too deeply coupled to the MongoDB driver to make good use of kotlinx.serialization.
I wouldn’t want to use kotlinx.serialization for that anyway 😅 I keep hitting limitations way too fast with that.
v