title: Java - convert json to complex object using jakson
body: <p>This might duplicate question, but i have search a lot for solution, but no luck.
  I have a Class like below:</p>
  
  <pre><code>public class RestartMapState {
  
      public RestartMapState(List&lt;MapStepData&gt; vMapStepData, List&lt;AbstractMap.SimpleEntry&lt;String,String&gt;&gt; vResolvedParameters, String vJobID){
          this.vJobID=vJobID;
          this.vResolvedParameters = vResolvedParameters;
          this.vMapStepData = vMapStepData;
      }
  
      public RestartMapState(){}
  
      private List&lt;MapStepData&gt; vMapStepData;
      public void setvMapStepData(List&lt;MapStepData&gt; mapStepData){ this.vMapStepData = mapStepData; }
      public List&lt;MapStepData&gt; getvMapStepData(){
          return this.vMapStepData;
      }
  
      private List&lt;AbstractMap.SimpleEntry&lt;String,String&gt;&gt; vResolvedParameters;
      public List&lt;AbstractMap.SimpleEntry&lt;String,String&gt;&gt; getvResolvedParameters(){  return this.vResolvedParameters; }
      public void setvResolvedParameters(List&lt;AbstractMap.SimpleEntry&lt;String,String&gt;&gt; resolvedParameters){ this.vResolvedParameters = resolvedParameters; }
  
      private String vJobID;
      public String getvJobID(){ return this.vJobID; }
      public void setvJobID(String jobID){ this.vJobID = jobID; }
  }
  </code></pre>
  
  <p>When i am trying this to json using following code, i am getting json file.</p>
  
  <pre><code>RestartMapState vRestartMapState = new RestartMapState(vRemainingStepsToBeExecuted, vMapResolvedParameters, vMapExCtx.getvJobID());
  try {
      vObjectMapper.writerWithDefaultPrettyPrinter().writeValue(stateFile, vRestartMapState);
  } catch (JsonGenerationException e) {
      isSerialized = false;
      e.printStackTrace();
  } catch (JsonMappingException e) {
      isSerialized = false;
      e.printStackTrace();
  } catch (IOException e) {
      isSerialized = false;
      e.printStackTrace();
  }
  </code></pre>
  
  <p>My JSON file looks like below:</p>
  
  <pre><code>{
    "vMapStepData" : [ {
      "dependsOn" : null,
      "orderIndex" : 0,
      "name" : "Step1",
      "mapStepId" : 167119,
      "sqlstatements" : {
        "sqlstatement" : [ {
          "value" : "-- Map Step   (Step1)\nCREATE TABLE ##!sessionid##Step1\n    AS\nSELECT currency_nbr AS currency_nbr,...",
          "orderIndex" : 1,
          "isQuery" : false,
          "flags" : [ "PartOfCore" ]
        } ]
      }
    }, {
      "dependsOn" : null,
      "orderIndex" : 1,
      "name" : "Step2",
      "mapStepId" : 237822,
      "sqlstatements" : {
        "sqlstatement" : [ {
          "value" : "\n\n-- Map Step   (Step2)\nCREATE TABLE ##!sessionid##Step2\n    AS\nSELECT country_cd AS ....",
          "orderIndex" : 1,
          "isQuery" : false,
          "flags" : [ "PartOfCore" ]
        } ]
      }
    } ],
    "vResolvedParameters" : [ {
      "key" : "##RUNDATE##",
      "value" : "2018045"
    }, {
      "key" : "##julian##",
      "value" : "2018033"
    } ],
    "vJobID" : "10012"
  }
  </code></pre>
  
  <p>But when i try to de-serialize the same json file to the object of type RestartMapState, i am getting following error.</p>
  
  <pre><code>org.codehaus.jackson.map.JsonMappingException: No suitable constructor found for type [simple type, class java.util.AbstractMap$SimpleEntry&lt;java.lang.String,java.lang.String&gt;]: can not instantiate from JSON object (need to add/enable type information?)
   at [Source: C:\Users\vkukk1\.MAP_STATE_System_Test_Group_Vasu_Test_2_10012.json; line: 30, column: 5] (through reference chain: com.aexp.idn.magellan.RestartMapState["vResolvedParameters"]) RestartMapState vRestartMapState = null;
  </code></pre>
  
  <p>Can some one please help me to fix this, what am i doing wrong?</p>