Construct Object from Json/Map (with Annotations)
<p>I have this class that I persist by creating a JSON object based on its annotation:</p>

<pre><code>@Entity(name = "user")
public class User { 
    @Id 
    private String id;
    @Column
    private String name;
    @Column
    private Integer age;
    public User() {}
public User(String id, String name, String age) {}
// ... code omitted
}

boolean ok = createEntity(new User("uid1", "eli", 25));
</code></pre>

<p>The method above will convert the User object into a Map respresenting a JSON object like:</p>

<pre><code>map.put("ID", "uid1");
map.put("name", "eli");
map.put("age", 25);
</code></pre>

<p>This works fine. However I need to create a User object based on a response map containling values in similar form like the above, first I get the response from the server in form of JSON string:</p>

<pre><code>{
    "id" : "uid2",
    "name" : "ben",
    "age" : 20
}
</code></pre>

<p>I mean, if I parse this JSON string into a map:</p>

<pre><code>map.put("id", "uid2");
map.put("name", "ben");
map.put("age", 20);
</code></pre>

<p>How can I construct a User object filling the values from the map to the correct <code>@Column</code> field?</p>

<p>Update:</p>

<p>I know about Jackson library, but the idea here is that I need to work with annotations as I am building a library that needs classes to be annotated. I am just after the way to create object from json/map and assign the right values to the right field </p>
