Packages
vela_cache
0.1.0
A distributed cache library for Elixir with pluggable backends, topologies, and near-cache support.
Current section
Files
Jump to
Current section
Files
lib/vela/serializer/json.ex
defmodule Vela.Serializer.JSON do
@moduledoc """
JSON serializer using Jason. Human-readable, cross-language compatible,
but limited to JSON-compatible types.
Requires the `:jason` optional dependency.
"""
@behaviour Vela.Serializer
@impl true
def encode(term, _opts) do
Jason.encode(term)
end
@impl true
def decode(binary, _opts) do
Jason.decode(binary)
end
end