Blazon
Blazon allows you to quickly build abstract serializers in a declarative fashion. Expose complex object hierarchies in JSON, XML, UBF, or whatever!
Example
defmodule Person.Serializer do
use Blazon.Serializable
field :name
field :title
field :age
end
Blazon.json(Person.Serializer, %{name: "John Cleese", title: "Minister of Silly Walks", age: 42}, except: ~w(age)a)Usage
First Steps
...
Embedding
...
Is Blazon production ready?
No. But will be very soon.
Installation
-
Add
blazonto your list of dependencies inmix.exs:
def deps do
[{:blazon, "~> 0.0.1"}]
endDrink your :tea:
That's it!