Closed aliubymov-playq closed 3 years ago
implicit def optionEncoder[T: D4SAttributeEncoder]: D4SAttributeEncoder[Option[T]] = { item: Option[T] => item.map(encode[T]).getOrElse(AttributeValue.builder().nul(true).build()) }
when we need to
implicit def optionEncoder[T: D4SAttributeEncoder]: D4SAttributeEncoder[Option[T]] = { item: Option[T] => item.map(encode[T]) // expects Optional attribute to not write unnecessary parts }
Decoder already supports optional attributes.
when we need to
Decoder already supports optional attributes.