View Source Jason.Encode (jason v1.4.1)

Utilities for encoding elixir values to JSON.

Link to this section Summary

Link to this section Types

@opaque opts()

Link to this section Functions

@spec atom(atom(), opts()) :: iodata()
@spec float(float()) :: iodata()
@spec integer(integer()) :: iodata()
@spec keyword(
  keyword(),
  opts()
) :: iodata()
@spec list(list(), opts()) :: iodata()
@spec map(map(), opts()) :: iodata()
@spec string(String.t(), opts()) :: iodata()
@spec struct(
  struct(),
  opts()
) :: iodata()
@spec value(term(), opts()) :: iodata()

Equivalent to calling the Jason.Encoder.encode/2 protocol function.

Slightly more efficient for built-in types because of the internal dispatching.