Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/howardjohn/scanamo-json

Scanamo DynamoFormat for popular Scala Json libraries
https://github.com/howardjohn/scanamo-json

circe dynamodb json scala scanamo

Last synced: 2 months ago
JSON representation

Scanamo DynamoFormat for popular Scala Json libraries

Awesome Lists containing this project

README

        

# Scanamo Json
Scanamo Json provides `DynamoFormat`s for popular Scala Json libraries. The format will serialize directly to DynamoDB `AttributeValue`s, allowing full use of DynamoDB while allowing arbitrary Json objects to be stored or reusing existing formats.

# Getting started

### Circe

First, add the dependency:

```scala
libraryDependencies += "io.github.howardjohn" %% "scanamo-circe" % "0.2.1"
```

Finally, the format can be imported with:

```scala
import io.github.howardjohn.scanamo.CirceDynamoFormat._
```

This provides a `DynamoFormat[T]` for all `T` with both an `Encoder` and `Decoder`.

### Play Json

First, add the dependency:

```scala
libraryDependencies += "io.github.howardjohn" %% "scanamo-play-json" % "0.2.1"
```

Finally, the format can be imported with:

```scala
import io.github.howardjohn.scanamo.PlayJsonDynamoFormat._
```

This provides a `DynamoFormat[T]` for all `T` with a (play-json) `Format`.