Skip to content

Commit

Permalink
Merge pull request #86 from robstoll/patch-1
Browse files Browse the repository at this point in the history
fix readme examples, add missing ()
  • Loading branch information
julienrf authored Jul 7, 2022
2 parents aa0c78a + 068d3a7 commit 3a7908a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ import julienrf.json.derived
case class User(name: String, age: Int)

object User {
implicit val reads: Reads[User] = derived.reads
implicit val reads: Reads[User] = derived.reads()
}
~~~

The [API](https://www.javadoc.io/doc/org.julienrf/play-json-derived-codecs_2.12) is simple: the object
`julienrf.json.derived` has just three methods.

- `reads[A]`, derives a `Reads[A]` ;
- `owrites[A]`, derives a `OWrites[A]` ;
- `oformat[A]`, derives a `OFormat[A]`.
- `reads[A]()`, derives a `Reads[A]` ;
- `owrites[A]()`, derives a `OWrites[A]` ;
- `oformat[A]()`, derives a `OFormat[A]`.

### Representation of Sum Types

Expand Down

0 comments on commit 3a7908a

Please sign in to comment.