title: What is the difference between a map and a record in avro?
body: <p>I'm using <a href="http://avro.apache.org/docs/current/spec.html" rel="nofollow">Apache Avro</a> for a project, but I can't seem to make sense of what it calls <em>maps</em>. I haven't been able to find any examples of maps in use, and the example on the spec is pretty bare:</p>
  
  <blockquote>
    <h1>Maps</h1>
    
    <p>Maps use the type name <code>"map"</code> and support one attribute:</p>
    
    <ul>
    <li><code>values:</code> the schema of the map's values.</li>
    </ul>
    
    <p>Map keys are assumed to be strings.</p>
    
    <p>For example, a map from string to long is declared with:</p>
    
    <p><code>{"type": "map", "values": "long"}</code></p>
  </blockquote>
  
  <p>What might data that fits that schema look like as JSON? What use does a map have that a record doesn't do better?</p>