MailKite.JSON (MailKite v0.13.0)

Copy Markdown View Source

Thin internal JSON shim so the rest of the SDK never has to care which encoder backs it. On Elixir 1.18+ this delegates to the standard-library JSON module (zero dependencies, matching the SDK family's zero-dependency ethos); on older Elixir it delegates to Jason.

Summary

Functions

Decode a JSON string, returning {:ok, term} or {:error, reason}.

Decode a JSON string, raising on error.

Encode a term to a JSON string, raising on error.

Functions

decode(binary)

Decode a JSON string, returning {:ok, term} or {:error, reason}.

decode!(binary)

Decode a JSON string, raising on error.

encode!(term)

Encode a term to a JSON string, raising on error.