Ash.Info.Manifest.JsonSerializer (ash v3.25.1)

Copy Markdown View Source

Serializes %Ash.Info.Manifest{} structs to JSON.

Recursively converts structs to maps, converting module atoms to strings and omitting nil fields.

Summary

Functions

Serialize an %Ash.Info.Manifest{} to a JSON string.

Convert an %Ash.Info.Manifest{} to a plain map (suitable for JSON encoding).

Functions

to_json(spec, opts \\ [])

@spec to_json(
  Ash.Info.Manifest.t(),
  keyword()
) :: {:ok, String.t()} | {:error, term()}

Serialize an %Ash.Info.Manifest{} to a JSON string.

to_map(spec)

@spec to_map(Ash.Info.Manifest.t()) :: map()

Convert an %Ash.Info.Manifest{} to a plain map (suitable for JSON encoding).