Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cornerman authored Jun 12, 2024
1 parent 4fb306b commit 9d77748
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This will not bloat your project. It only has an effect if you explicitly depend

Get latest release:
```scala
libraryDependencies += "com.github.cornerman" %%% "chameleon" % "0.4.0"
libraryDependencies += "com.github.cornerman" %%% "chameleon" % "0.4.1"
```

We additionally publish sonatype snapshots for every commit on master.
Expand Down Expand Up @@ -56,7 +56,7 @@ We have an extra package to integrate `http4s` with chameleon `Serializer` and `

Usage:
```scala
libraryDependencies += "com.github.cornerman" %%% "chameleon-http4s" % "0.4.0"
libraryDependencies += "com.github.cornerman" %%% "chameleon-http4s" % "0.4.1"
```

To work with json inside your API:
Expand All @@ -83,6 +83,8 @@ Ok(MyCaseClass("hallo"))
someRequest.as[MyCaseClass]
```

There are similar helpers for other types than `String`, for example `Array[Byte]`. Also there are other serialization targets than `json` like `text`, `binary`, and `messagePack` - this depends on the semantics of the used serialization method. [See here](http4s/src/main/scala/chameleon/ext/http4s).

# Motivation

Say, you want to write a library that needs serialization but abstracts over the type of serialization. Then you might end up with something like this:
Expand Down

0 comments on commit 9d77748

Please sign in to comment.