Skip to content

Commit 894659b

Browse files
authored
Merge pull request #36 from bmjsmith/patch-1
Include suggestion about json4s-ext in README
2 parents bf4e51a + 5ff7316 commit 894659b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,15 @@ When using JWT, you need to provide a serializer which serializes session data t
247247
A number of implicit serializers for the basic types are present in `JValueSessionSerializer`, as well as a generic
248248
serializer for case classes (used above).
249249

250+
You may also find it helpful to include the json4s-ext library which provides serializers for common Java types such as
251+
`java.util.UUID`, `org.joda.time._` and Java enumerations.
252+
253+
````scala
254+
import org.json4s.ext.JavaTypesSerializers
255+
256+
implicit lazy val formats: Formats = Serialization.formats(NoTypeHints) ++ JavaTypesSerializers.all
257+
````
258+
250259
There are many tools available to read JWT session data using various platforms, e.g.
251260
[for Angular](https://github.com/auth0/angular-jwt).
252261

0 commit comments

Comments
 (0)