Corex.Json (Corex v0.2.0)

View Source

OTP :json wrapper that encodes nil as null and decodes null back to nil.

The single encoder for the corex package. corex_mcp carries a byte-compatible copy because it does not depend on corex.

Summary

Functions

decode(iodata)

@spec decode(iodata()) :: {:ok, term()} | {:error, Exception.t()}

decode!(iodata)

@spec decode!(iodata()) :: term()

encode!(term)

@spec encode!(term()) :: String.t()

encode_to_iodata!(term)

@spec encode_to_iodata!(term()) :: iodata()

encoder()

@spec encoder() :: module()