Scanamo Json provides DynamoFormats for popular Scala Json libraries. The format will serialize directly to DynamoDB AttributeValues, allowing full use of DynamoDB while allowing arbitrary Json objects to be stored or reusing existing formats.
First, add the dependency:
libraryDependencies += "io.github.howardjohn" %% "scanamo-circe" % "0.2.1"Finally, the format can be imported with:
import io.github.howardjohn.scanamo.CirceDynamoFormat._This provides a DynamoFormat[T] for all T with both an Encoder and Decoder.
First, add the dependency:
libraryDependencies += "io.github.howardjohn" %% "scanamo-play-json" % "0.2.1"Finally, the format can be imported with:
import io.github.howardjohn.scanamo.PlayJsonDynamoFormat._This provides a DynamoFormat[T] for all T with a (play-json) Format.