clojure-spec

Sturm 2023-06-11T13:14:24.233019Z

is it possible to use spec to validate maps where keys are strings? eg. to check {"name" "Joe" "age" 66} to make sure "name" and "age" are present and that they match string? and int? respectively. I might be missing something obvious, but I can only see examples with keyword-based maps.

Alex Miller (Clojure team) 2023-06-11T13:18:03.531339Z

You can use map-of but not s/keys

Sturm 2023-06-11T13:20:44.448239Z

thanks @alexmiller, I'll have a play with map-of