title: Converting a Map<String, String> to a Value type with Jedis
body: <p>So, I have a value type :</p>
  
  <pre><code>class Session {
      long createdAt;
      List&lt;String&gt; postIds;
  }
  </code></pre>
  
  <p>Using the <strong>jedis</strong> client(<code>3.0.0-m1</code> is that matters), I am currently performing an <code>hset</code> to create the entries and <code>hgetAll</code> to retrieve all the key-values:</p>
  
  <pre><code>private redis.clients.jedis.Jedis jedis;
  
  void createSession(String idAsKey, Map&lt;String, String&gt; hashFieldValues) {
      jedis.hset(idAsKey, hashFieldValues);
  }
  
  
  Map&lt;String, String&gt; fetchSession(String idAsKey) {
      return jedis.hgetAll(idAsKey);
  }
  </code></pre>
  
  <p>The challenge that I am currently looking at is the ease of converting the <code>Map&lt;String, String&gt;</code> into the <code>Session</code> object. Is there an existing way to do this?</p>
  
  <p>Server response for an equivalent command</p>
  
  <blockquote>
  <pre><code>1) "createdAt"
  2) "1556099708307"
  3) "postIds"
  4) "[a, b, c]"
  </code></pre>
  </blockquote>
  
  <p><strong><em>PS</em></strong>: Starting to learn Redis, hoping this kind of mapping might have already been solved for. Yes, not looking for a client change as an answer at least.</p>