Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

meetwalter/blazon

Repository files navigation

Blazon

Continuous Integration Code Coverage Documentation Package

Blazon allows you to quickly build abstract serializers in a declarative fashion. It also has a large focus on composition, allowing you to quickly build and reuse common functionality for things like pagination, automatic preloading, and so on in a few lines of code. Furthermore, Blazon is format agnostic so you can expose your complex object heirarchies in JSON, XML, UBF, CSV, or whatever you want without changing your presentation logic.

Although Blazon has great test coverage, its design is nowhere near final and is rapidly changing, making it unsuitable for production.

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)

Installation

  1. Add blazon to your list of dependencies in mix.exs:
def deps do
 [{:blazon, "~> 0.0.1"}]
end
  1. Drink your 🍡

  2. That's it!

Usage

First Steps

...

Options

...

Embedding

...

Linking

...

Composition

...

About

πŸ”° Declarative abstract serializers for Elixir.

Resources

License

Stars

Watchers

Forks

Packages

Contributors

Languages

  • Elixir 100.0%

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /