We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
circe-core veresion: 2.12_0.14.1
case class AIRequest(requestId: String, height: Int, width: Int, inputs: List[InputData]) case class InputData(base64Array: String, dataType: String, shape: List[Int], layout: String) implicit val requestBar: Encoder[AIRequest] = Encoder.forProduct4("id", "width", "height", "inputs")(b => (b.requestId, b.width, b.height, b.inputs)) implicit val dataEncoder: Encoder[InputData] = Encoder.forProduct4("array", "dtype", "shape", "layout")(b => (b.base64Array, b.dataType, b.shape, b.layout)) describe("json test") { it("bean to json") { val inputData = InputData("aaa", "uint8", List(3, 256, 256), "test") val aIRequest = AIRequest("bbb", 256, 256, List(inputData)) println(aIRequest.asJson.noSpaces) } }
Error:
java.lang.NullPointerException was thrown. java.lang.NullPointerException at io.circe.MidPriorityEncoders$IterableAsArrayEncoder.encodeArray(Encoder.scala:919) at io.circe.Encoder$AsArray.apply(Encoder.scala:744) at io.circe.Encoder$AsArray.apply$(Encoder.scala:744) at io.circe.MidPriorityEncoders$IterableAsArrayEncoder.apply(Encoder.scala:911) at io.circe.ProductEncoders$$anon$4.encodeObject(ProductEncoders.scala:50) at io.circe.Encoder$AsObject.apply(Encoder.scala:824) at io.circe.Encoder$AsObject.apply$(Encoder.scala:824) at io.circe.ProductEncoders$$anon$4.apply(ProductEncoders.scala:47) at io.circe.syntax.package$EncoderOps$.asJson$extension(package.scala:8)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
circe-core veresion: 2.12_0.14.1
Error:
The text was updated successfully, but these errors were encountered: