title: Validate schema of a list in Erlang
body: <p>I receive requests from client apps via API endpoints as JSON objects, then parse them and convert to lists, like this</p>
  
  <pre><code>[
    {&lt;&lt;"firstname"&gt;&gt;, &lt;&lt;"John"&gt;&gt;},
    {&lt;&lt;"lastname"&gt;&gt;, &lt;&lt;"Doe"&gt;&gt;},
  ]
  </code></pre>
  
  <p>I have schema stating that the object must have two fields "firstname" and "lastname" as string.</p>
  
  <p>Are there libraries to validate structures against schema or it can be solved with my own code relatively easily?</p>