mason alternatives and similar packages
Based on the "Algorithms and Data structures" category.
Alternatively, view mason alternatives based on common mentions on social networks and blogs.
-
exconstructor
An Elixir library for generating struct constructors that handle external data with ease. -
aja
Extension of the Elixir standard library focused on data stuctures, data manipulation and performance -
remodel
:necktie: An Elixir presenter package used to transform map structures. "ActiveModel::Serializer for Elixir" -
MapDiff
Calculates the difference between two (nested) maps, and returns a map representing the patch of changes. -
the_fuzz
String metrics and phonetic algorithms for Elixir (e.g. Dice/Sorensen, Hamming, Jaccard, Jaro, Jaro-Winkler, Levenshtein, Metaphone, N-Gram, NYSIIS, Overlap, Ratcliff/Obershelp, Refined NYSIIS, Refined Soundex, Soundex, Weighted Levenshtein) -
exmatrix
Elixir library implementing a parallel matrix multiplication algorithm and other utilities for working with matrices. Used for benchmarking computationally intensive concurrent code. -
bitmap
Bitmap implementation in Elixir using binaries and integers. Fast space efficient data structure for lookups -
Closure Table
Closure Table for Elixir - a simple solution for storing and manipulating complex hierarchies.
InfluxDB - Power Real-Time Data Analytics at Scale
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of mason or a related project?
Popular Comparisons
README
Mason
Mason uses superpowers to coerce maps into structs. This is helpful e.g. when you interface a REST API and want to create a struct from the response.
defmodule User do
defstruct [ :user_id, :created_at ]
def masonstruct do
%{
createdAt: &({ :created_at, elem(DateTime.from_unix(&1), 1) }),
userId: &({ :user_id, &1 })
}
end
end
response = %{ "userId" => 123, createdAt: 1456749030 }
Mason.struct User, response # %User{created_at: #DateTime<2016-02-29 12:30:30Z>, user_id: 123}
Features
- coerce to Elixir's built-in types from strings
- dynamically coerce values (e.g. timestamps to
DateTime
s) - map keys (e.g.
createdAt
tocreated_at
) - convert string keys to atoms (e.g.
..., "age" => 29, ...
to..., age: 29, ...
) - convert lists
Installation
The package can be installed by adding mason
to your list of
dependencies in mix.exs
:
def deps do
[
{:mason, "~> 0.1.0"}
]
end
The docs can be found at https://hexdocs.pm/mason.
Contributing
- We use gitflow (with the production branch
being
master
and the development branch beingdevelop
) - and semantic commit messages.
- We use semantic versioning.
- We use pull requests and run our test suite on Travis CI.