kbson icon indicating copy to clipboard operation
kbson copied to clipboard

Mongo BSON support for kotlinx.serialization.

Results 7 kbson issues
Sort by recently updated
recently updated
newest added

Some times it is required to serialise in Bson a property that is mapped to a Map type. It would be nice if the Map can be encoded to a...

Because we can't always add a NonEncodeNull annotation

I have an object with a Long property, but the value is stored as Double. When I try to deserialize it: ``` org.bson.BsonInvalidOperationException: Value expected to be of type INT64...

enhancement
help wanted

use `MutableCollection` ```kotlin import com.github.jershell.kbson.KBson import kotlinx.serialization.Serializable import org.bson.BsonArray import org.bson.BsonDocument import org.bson.BsonElement import org.bson.BsonString @Serializable data class Container( val users: MutableCollection ) @Serializable data class User(val name: String) fun...

When decoding a `SerialKind.OBJECT` the `BsonFlexibleDecoder` does not start the document read, but it does end it. https://github.com/jershell/kbson/blob/master/src/main/kotlin/com/github/jershell/kbson/BsonFlexibleDecoder.kt#L61 This causes the following error when attempting to decode objects even if...

Starting with 0.4.5 Because of the published gradle metadata: https://repo1.maven.org/maven2/com/github/jershell/kbson/0.4.5/kbson-0.4.5.module

### Current state The PolymorphismDecoder expects the first field in the BSON document (or the second, if the first one is the `_id`) to contain the class discriminator. If the...