Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Jul 27, 2023
1 parent f049874 commit cecf5ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Response can be parsed into json using `asJson[T]`, provided there's an implicit
import sttp.client4._
import sttp.client4.circe._

val backend: WebSocketSyncBackend = DefaultSyncBackend()
val backend: SyncBackend = DefaultSyncBackend()

import io.circe.generic.auto._
val requestPayload = RequestPayload("some data")
Expand Down Expand Up @@ -80,7 +80,7 @@ Usage example:
import sttp.client4._
import sttp.client4.json4s._

val backend: WebSocketSyncBackend = DefaultSyncBackend()
val backend: SyncBackend = DefaultSyncBackend()

val requestPayload = RequestPayload("some data")

Expand Down Expand Up @@ -112,7 +112,7 @@ import sttp.client4._
import sttp.client4.sprayJson._
import spray.json._

val backend: WebSocketSyncBackend = DefaultSyncBackend()
val backend: SyncBackend = DefaultSyncBackend()

implicit val payloadJsonFormat: RootJsonFormat[RequestPayload] = ???
implicit val myResponseJsonFormat: RootJsonFormat[ResponsePayload] = ???
Expand Down Expand Up @@ -203,7 +203,7 @@ import sttp.client4.jsoniter._
import com.github.plokhotnyuk.jsoniter_scala.core._
import com.github.plokhotnyuk.jsoniter_scala.macros._

val backend: WebSocketSyncBackend = DefaultSyncBackend()
val backend: SyncBackend = DefaultSyncBackend()

implicit val payloadJsonCodec: JsonValueCodec[RequestPayload] = JsonCodecMaker.make
//note that the jsoniter doesn't support 'implicit defs' and so either has to be generated seperatly
Expand Down

0 comments on commit cecf5ef

Please sign in to comment.