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

codecs.basic.NonRecursiveJSONEncoderCodec.kt Maven / Gradle / Ivy

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

import kotlin.reflect.*


internal class NonRecursiveJSONEncoderCodec(
	override val encodableClass: KClass
) : JSONEncoderCodec {

	override fun JSONEncoder.encode(value: Value) {
		JSONSerializer.default.serializeValue(value, destination = this, withTermination = false)
	}


	companion object {

		inline fun  create(): JSONEncoderCodec =
			NonRecursiveJSONEncoderCodec(encodableClass = Value::class)
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy