title: Java : convert POJO to map?
body: <p>I would like to know if there is a way to convert a POJO, for example for <code>Person a</code>, the <code>Person</code> class is :</p>
  <pre><code>public class Person {
    private String name;
    private int age;
    // getter and setter
    ....
  }
  </code></pre>
  <p>to a map of type <code>Map&lt;String, Object&gt;</code> ? in which <code>String</code> is the field name and <code>Object</code> is its value.</p>