Mold is a tiny, zero-dependency Elixir library for parsing external payloads such as JSON API responses, webhooks, and HTTP params into clean, typed Elixir terms. It follows the 'Parse, don't validate' philosophy, transforming untyped input (string keys, string values) into well-typed output or returning structured errors with path traces. Types in Mold are plain Elixir data — atoms, functions, or tuples — that can be composed dynamically. Built-in support covers strings, integers, booleans, dates, maps, and lists, with options for defaults, nilability, constraints, and custom transforms.

3m read timeFrom github.com
Post cover image
Table of contents
PhilosophyInstallationQuick startTypesLicense

Sort: