mirror of
https://github.com/wanderer-industries/wanderer
synced 2026-08-27 08:16:31 +00:00
15 lines
259 B
Elixir
15 lines
259 B
Elixir
defmodule WandererApp.Utils.JSONUtil do
|
|
@moduledoc false
|
|
|
|
def read_json(filename) do
|
|
{:ok, body} = File.read(filename)
|
|
Jason.decode(body)
|
|
end
|
|
|
|
def read_json!(filename),
|
|
do:
|
|
filename
|
|
|> File.read!()
|
|
|> Jason.decode!()
|
|
end
|