All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uidsonic.fluid-json-coding.0.9.14.source-code.JSONEncoderCodec.kt Maven / Gradle / Ivy

There is a newer version: 0.9.24
Show newest version
package com.github.fluidsonic.fluid.json

import kotlin.reflect.KClass


interface JSONEncoderCodec : JSONCodecProvider {

	val encodableClass: KClass


	fun JSONEncoder.encode(value: Value)


	override fun  decoderCodecForType(decodableType: JSONCodingType): JSONDecoderCodec? =
		null


	@Suppress("UNCHECKED_CAST")
	override fun  encoderCodecForClass(encodableClass: KClass): JSONEncoderCodec? =
		if (encodableClass.isAssignableOrBoxableTo(this.encodableClass))
			this as JSONEncoderCodec
		else
			null


	companion object
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy