Current section

Files

Jump to
eyeon lib eyeon text_decoder.ex
Raw

lib/eyeon/text_decoder.ex

defmodule Eyeon.TextDecoder do
@moduledoc """
Decodes Ion text format to Elixir values.
Delegates to Eyeon.TextParser for single-pass recursive descent parsing.
"""
alias Eyeon.Catalog
@spec decode(iodata(), Catalog.t(), map()) :: {:ok, any()} | {:error, any()}
def decode(data, catalog \\ Catalog.new([]), options \\ %{}) do
Eyeon.TextParser.parse(data, %{catalog: catalog, options: options})
end
end