From 1f43e1d993ecbf0e782172b4958bd55c599837d6 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sun, 23 Mar 2025 08:34:25 +0000 Subject: [PATCH] Use JSON instead of Jason where possible In some places, we need pretty printing so it's not possible to remove the dependency. --- config/config.exs | 4 ++-- test/support/fixtures/music_brainz/release.ex | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/config.exs b/config/config.exs index e04a21f5..e001dbfd 100644 --- a/config/config.exs +++ b/config/config.exs @@ -61,8 +61,8 @@ config :logger, :console, format: "$time $metadata[$level] $message\n", metadata: [:request_id] -# Use Jason for JSON parsing in Phoenix -config :phoenix, :json_library, Jason +# Use JSON for JSON parsing in Phoenix +config :phoenix, :json_library, JSON config :error_tracker, repo: MusicLibrary.ErrorRepo, diff --git a/test/support/fixtures/music_brainz/release.ex b/test/support/fixtures/music_brainz/release.ex index aa65b0fa..6018193d 100644 --- a/test/support/fixtures/music_brainz/release.ex +++ b/test/support/fixtures/music_brainz/release.ex @@ -4,13 +4,13 @@ defmodule MusicBrainz.Fixtures.Release do def releases(:queen_greatest_hits) do Path.join([@fixtures_folder, "releases - queen - greatest hits.json"]) |> File.read!() - |> Jason.decode!() + |> JSON.decode!() end def releases(:marbles) do Path.join([@fixtures_folder, "releases - marillion - marbles.json"]) |> File.read!() - |> Jason.decode!() + |> JSON.decode!() end def release(:mystery_of_time) do