Packages

Elixir client for the ORY Hydra administrative API

Current section

Files

Jump to
ory_hydra lib ory hydra helpers json.ex
Raw

lib/ory/hydra/helpers/json.ex

defmodule ORY.Hydra.Helpers.JSON do
@spec decode(String.t(), ORY.Hydra.Config.t()) :: any
def decode(json, config) do
case config.json_codec.decode(json) do
{ :ok, result } ->
result
{ :error, _reason } ->
json
end
end
end