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

pl.touk.nussknacker.engine.requestresponse.DefaultResponseEncoder.scala Maven / Gradle / Ivy

package pl.touk.nussknacker.engine.requestresponse

import io.circe.Json
import pl.touk.nussknacker.engine.requestresponse.api.ResponseEncoder
import pl.touk.nussknacker.engine.util.json.ToJsonEncoder

object DefaultResponseEncoder extends ResponseEncoder[Any] {

  private val encoder = ToJsonEncoder(failOnUnknown = true, getClass.getClassLoader)

  override def toJsonResponse(input: Any, result: List[Any]): Json = encoder.encode(result)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy