mirror of
https://github.com/InsanusMokrassar/SDI.git
synced 2024-12-28 03:27:23 +00:00
commit
025191ba61
@ -1,5 +1,11 @@
|
||||
# SDI changelogs
|
||||
|
||||
## 0.4.1
|
||||
|
||||
* `Serialization`: `1.1.0-RC` -> `1.1.0`
|
||||
* `ModuleSerializer` now can be instantiated automatically
|
||||
|
||||
|
||||
## 0.4.0
|
||||
|
||||
* Fix of [#6](https://github.com/InsanusMokrassar/SDI/issues/6)
|
||||
|
@ -3,10 +3,10 @@ org.gradle.parallel=true
|
||||
kotlin.incremental.multiplatform=true
|
||||
|
||||
kotlin_version=1.4.30
|
||||
kotlin_serialisation_runtime_version=1.1.0-RC
|
||||
kotlin_serialisation_runtime_version=1.1.0
|
||||
klassindex_version=4.1.0-rc.1
|
||||
|
||||
github_release_plugin_version=2.2.12
|
||||
|
||||
group=dev.inmo
|
||||
version=0.4.0
|
||||
version=0.4.1
|
||||
|
@ -94,9 +94,16 @@ internal data class SerializationContext(
|
||||
|
||||
@Serializer(Module::class)
|
||||
class ModuleSerializer(
|
||||
private val moduleBuilder: (SerializersModuleBuilder.() -> Unit)? = null,
|
||||
private vararg val additionalClassesToInclude: KClass<*>
|
||||
private val additionalClassesToInclude: Iterable<KClass<*>>,
|
||||
private val moduleBuilder: (SerializersModuleBuilder.() -> Unit)? = null
|
||||
) : KSerializer<Module> {
|
||||
constructor() : this(emptyList()) // to be able to create default instance
|
||||
|
||||
constructor(
|
||||
moduleBuilder: (SerializersModuleBuilder.() -> Unit)? = null,
|
||||
vararg additionalClassesToInclude: KClass<*>,
|
||||
) : this(additionalClassesToInclude.toList(), moduleBuilder)
|
||||
|
||||
private val jsonObjectSerializer = JsonObject.serializer()
|
||||
override val descriptor: SerialDescriptor = jsonObjectSerializer.descriptor
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user