Popularity
6.2
Stable
Activity
0.0
Stable
62
7
20
Monthly Downloads: 8
Programming language: Elixir
License: Do What The F*ck You Want To Public License
Tags:
JSON
Latest version: v0.1.2
jazz alternatives and similar packages
Based on the "JSON" category.
Alternatively, view jazz alternatives based on common mentions on social networks and blogs.
-
jsx
an erlang application for consuming, producing and manipulating json. inspired by yajl -
json_web_token_ex
An Elixir implementation of the JSON Web Token (JWT) Standard, RFC 7519 -
json_pointer
Implementation of RFC 6901 which defines a string syntax for identifying a specific value within a JSON document -
jwalk
Helper module for working with Erlang proplists, eep 18, map and mochijson-style JSON representations
Access the most powerful time series database as a service
Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Promo
www.influxdata.com
Do you think we are missing an alternative of jazz or a related project?
Popular Comparisons
README
jazz - JSON handling library for Elixir
Jazz is a JSON handling library written in Elixir, for Elixir.
Examples
use Jazz
JSON.encode!(%{name: "David", surname: "Davidson"})
|> IO.puts # => {"name":"David","surname":"Davidson"}
JSON.decode!(~S/{"name":"David","surname":"Davidson"}/)
|> IO.inspect # => %{"name" => "David", "surname" => "Davidson"}
JSON.decode!(~S/{"name":"David","surname":"Davidson"}/, keys: :atoms)
|> IO.inspect # => %{name: "David", surname: "Davidson"}
# would raise if the keys weren't already existing atoms
JSON.decode!(~S/{"name":"David","surname":"Davidson"}/, keys: :atoms!)
|> IO.inspect # => %{name: "David", surname: "Davidson"}
defmodule Person do
defstruct name: nil, surname: nil
end
JSON.encode!(%Person{name: "David", surname: "Davidson"})
|> IO.puts # => {"name":"David","surname":"Davidson"}
JSON.decode!(~S/{"name":"David","surname":"Davidson"}/, as: Person)
|> IO.inspect # => %Person{name: "David", surname: "Davidson"}
defimpl JSON.Encoder, for: HashDict do
def encode(self, options) do
HashDict.to_list(self) |> Enum.into(%{})
end
end
defimpl JSON.Decoder, for: HashDict do
def decode(_new, parsed, _options) do
parsed |> Enum.into(HashDict.new)
end
end
JSON.encode!(HashDict.new([name: "David", surname: "Davidson"]))
|> IO.puts # => {"name":"David","surname":"Davidson"}
JSON.decode!(~S/{"name":"David","surname":"Davidson"}/, as: HashDict)
|> IO.inspect # => #HashDict<[{"name", "David" }, { "surname", "Davidson" }]>