O'Reilly logo

Clojure Programming Cookbook by Nicolas Modrzyk, Makoto Hashimoto

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Declarative data descriptions and validations with plumatic/schema

Clojure is dynamically typed language and often provides productivity when you develop alone or in a small team. However, developments in larger teams sometimes require knowledge about data between members. prismatic/schema provides the solution for the aforementioned problems.

In this recipe, we will learn how to add descriptive expressions and validations in Clojure. We will use prismatic/schema to define schemas for various data types and validate them with schemas. prismatic/schema can define functions that define schemas for input parameters and a return. We will then learn how to coerce one data type to another.

Finally, we will learn other solutions. We will introduce core/typed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required