Permalink
Browse files

Add a note for older scala versions and custom codecs.

  • Loading branch information...
jan0sch authored and travisbrown committed Jan 8, 2019
1 parent dcbbc48 commit 885428bdbcadb6224041de143fc586c3e78b78c7
Showing with 7 additions and 0 deletions.
  1. +7 −0 docs/src/main/tut/codecs/custom-codecs.md
@@ -47,6 +47,13 @@ implicit val decodeInstant: Decoder[Instant] = Decoder.decodeString.emap { str =
}
```

#### Older scala versions

If you are using custom codecs and an older versions of scala (below 2.12) and you get errors like
this `value flatMap is not a member of io.circe.Decoder.Result[Option[String]]` or
`value map is not a member of io.circe.Decoder.Result[Option[String]]` then you need to use the
following import: `import cats.syntax.either._` to fix this.

### Custom key types

If you need to encode/decode `Map[K, V]` where `K` is not `String` (or `Symbol`, `Int`, `Long`, etc.),

0 comments on commit 885428b

Please sign in to comment.