FieldMapper

We may have a schema with a field in snake case like say { "first_name": "sam" } and that schema needs to be used for a case class field firstName.

We may have a schema with a field in snake case like say { "first_name": "sam" } and that schema needs to be used for a case class field firstName.

The FieldMapper is used to map fields in a schema to fields in a class by transforming the class field name to the wire name format.

Companion
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def to(name: String): String

Takes a field name from a type and converts it to the wire format. Eg, case class Foo(wibbleWobble: String) with a SnakeCase instance would result in wibble_wobble

Takes a field name from a type and converts it to the wire format. Eg, case class Foo(wibbleWobble: String) with a SnakeCase instance would result in wibble_wobble