Yson.Schema.map

You're seeing just the macro map, go back to Yson.Schema module for more information.
Link to this macro

map(name, opts \\ [], list)

View Source (macro)

Defines a map.

A map field could be a value, a map, an interface or a reference.

Example

map :person do
  value(:name)
end

You can also specify custom resolver to parse data. It can be either a reference or an anonymous function.

Example

reverse_name = fn %{name: name} -> %{name: String.reverse(name)} end
map :person, resolver: &reverse_name/1 do
  value(:name)
end