View Source Jason.Encode (jason v1.4.3)

Utilities for encoding elixir values to JSON.

Summary

Types

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.