ForkPoison.Encoder protocol (ForkForkPoison v6.0.1)

Copy Markdown View Source

Summary

Types

t()

All the types that implement this protocol.

Types

escape()

@type escape() :: :unicode | :javascript | :html_safe

indent()

@type indent() :: non_neg_integer()

offset()

@type offset() :: non_neg_integer()

option()

@type option() ::
  {:escape, escape()}
  | {:pretty, pretty()}
  | {:indent, indent()}
  | {:offset, offset()}
  | {:strict_keys, strict_keys()}

options()

@type options() :: %{
  optional(:escape) => escape(),
  optional(:pretty) => pretty(),
  optional(:indent) => indent(),
  optional(:offset) => offset(),
  optional(:strict_keys) => strict_keys()
}

pretty()

@type pretty() :: boolean()

strict_keys()

@type strict_keys() :: boolean()

t()

@type t() :: term()

All the types that implement this protocol.

Functions

encode(value, options)

@spec encode(t(), options()) :: iodata()