title: How to read and write Map<String, Object> from/to parquet file in Java or Scala?
body: <p>Looking for a concise example on how to read and write <code>Map&lt;String, Object&gt;</code> from/to parquet file in Java or Scala?</p>
  
  <p>Here is expected structure, using <code>com.fasterxml.jackson.databind.ObjectMapper</code>  as serializer in Java (i.e. looking for equivalent using parquet):</p>
  
  <pre><code>public static Map&lt;String, Object&gt; read(InputStream inputStream) throws IOException {
      ObjectMapper objectMapper = new ObjectMapper();
  
      return objectMapper.readValue(inputStream, new TypeReference&lt;Map&lt;String, Object&gt;&gt;() {
  
      });
  }
  
  public static void write(OutputStream outputStream, Map&lt;String, Object&gt; map) throws IOException {
      ObjectMapper objectMapper = new ObjectMapper();
  
      objectMapper.writeValue(outputStream, map);        
  }
  </code></pre>