View Source DSL: AshJason.Resource
Ash resource extension for implementing Jason.Encoder
protocol.
jason
Configuration for Jason encoder implementation.
Options
Name | Type | Default | Docs |
---|---|---|---|
pick | list(atom) | %{optional(:private?) => boolean, optional(:sensitive?) => boolean, optional(:include) => list(atom), optional(:exclude) => list(atom)} | Keys to pick from a record into json. An explicit names list or a behaviour configuration map. | |
merge | map | A map to merge into json. | |
customize | (map, map -> map) | A function to customize json. Receives a current result and a resource record. | |
order | boolean | (list(atom) -> list(atom)) | list(atom) | An order to apply to keys in json. A boolean, a sort function or a list of keys in a desired order. | |
rename | keyword | map | A mapping for renaming keys in json. Can be a map or a keyword list. |