raboof commented on code in PR #150:
URL:
https://github.com/apache/incubator-pekko-http/pull/150#discussion_r1206672717
##########
docs/src/test/scala/docs/http/scaladsl/server/directives/JsonStreamingFullExamples.scala:
##########
@@ -41,21 +42,21 @@ class JsonStreamingFullExamples extends AnyWordSpec {
import spray.json._
- implicit val userFormat = jsonFormat2(User)
+ implicit val userFormat: JsonFormat[User] = jsonFormat2(User.apply)
val `vnd.example.api.v1+json` =
MediaType.applicationWithFixedCharset("vnd.example.api.v1+json",
HttpCharsets.`UTF-8`)
val ct = ContentType.apply(`vnd.example.api.v1+json`)
implicit def userMarshaller: ToEntityMarshaller[User] = Marshaller.oneOf(
- Marshaller.withFixedContentType(`vnd.example.api.v1+json`) {
organisation =>
- HttpEntity(`vnd.example.api.v1+json`, organisation.toJson.compactPrint)
+ Marshaller.withFixedContentType(`vnd.example.api.v1+json`) { (user:
User) =>
Review Comment:
Also part of 63b3437048, seems to be a case of scala3 not inferring the type
of this parameter without it. Still seems to be the case for Scala 3.3.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]