How to convert JsonNode to Map
<p>using play framework java on the server i'm using graphiql to make requests,
when i do <code>final JsonNode variables = request().body().asJson().get("variables")</code>, 
a JsonNode with a value 
<code>"{\"id\":\"bar\"}"
</code> , now i want to convert this JsonNode to a Map,
i tried</p>

<pre><code>Json.mapper().convertValue(variables, new TypeReference&lt;HashMap&lt;String, Object&gt;&gt;() {
        });
</code></pre>

<p>but i keep getting this exception </p>

<pre><code>Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [map type; class java.util.HashMap, [simple type, class java.lang.String] -&gt; [simple type, class java.lang.Object]] from String value ('{"id":"bar"}'); no single-String constructor/factory method at [Source: N/A; line: -1, column: -1]
</code></pre>

<p>What am i doing wrongly? how do i convert that JsonNode to a map?</p>