Skip to content

Conversation

zoedsoupe
Copy link
Member

Problem

introduced on #74, users could customize the json library used to decode/encode data across the supabase-ex libraries, although functional, we've introduced 2 minor bugs:

  1. the otp app defined to retireve the json_library opt was mismatching the library ones (supabase_potion)
  2. with the new "feature", we lost the ability to convert the keys to atoms or not, which other supabase-ex libraries relies on

Solution

  1. correctly handles the otp app
  2. try to use the standard API for decode/1/encode_to_io_data!/1 since all json libraries have at least those functions with same interface and convert the keys internally

Rationale

N/A

@zoedsoupe zoedsoupe enabled auto-merge (squash) October 4, 2025 22:13
defguardp is_atom_opt(atom) when atom in ~w(atoms atoms!)a

@doc false
def decode_json(term, opts) do
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be used internally on the other libraries to avoid duplicating this logic across the ecosystem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant