ahmedmourad0 / bundlizer Goto Github PK
View Code? Open in Web Editor NEWAndroid Bundle format support for Kotlinx Serialization.
License: Apache License 2.0
Android Bundle format support for Kotlinx Serialization.
License: Apache License 2.0
Example:
@Serializable
data class AppState(
val slices: Map<String, @Polymorphic Any>
)
@Serializable
data class FeatureState1(...)
@Serializable
data class FeatureState2(...)
My @Polymorphic Any
type parameter can be FeatureState1 or FeatureState2. So what i do :
val module = SerializersModule {
polymorphic(Any::class) {
subclass(FeatureState1::class)
subclass(FeatureState2::class)
}
}
And then i can't provide "module" for Bundle[Encoder/Decoder] in
Bundlizer.bundle(AppState.serializer(), appstate)
so got error here ^.
It would be good to have optional parameter of type SerializersModule with default value "EmptySerializersModule".
Hi,
How to use with ArrayList?
@Serializable
class BottomSheetMenuItem(var tag: String, var text: String, var selected: Boolean)
var items = ArrayList<BottomSheetMenuItem>()
val itemsBundle = items.bundle(BottomSheetMenuItem.serializer())
Thanks.
Hi,
How to set/get using a key?
Im asking because my bundle need have other keys inside. There is any problem with this or the bundle can only have one bundlizer item?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.