update async scala client to use type classes for serializing and deserializing