title: Json as .textValue( ) - Jackson
body: <p>My need is to identify the pattern of input which passess this particular code. I don't understand why value of errormessage, though it is passed as string, gives null on <code>node.get("errorMessage").textValue()</code>. Please favour on the same.Ignore encoder/decoder.</p>
  
  <pre><code>public static void main(String args[]) throws JsonProcessingException, IOException{
  
          String err="{\"statusMessage\":\"InternalServerError\",\"status\":\"500\"}";
          String errormessage="{\"errorMessage\":"+err+"}";
          ByteBuffer buff=Charset.forName("UTF-8").encode(errormessage);
          String response=Charset.forName("UTF-8").decode(buff).toString();           
          ObjectMapper mapper = new ObjectMapper();
          JsonNode node = mapper.readTree(response);
             try{
             String errorMessageText = node.get("errorMessage").textValue();
              JsonNode errorNode = mapper.readTree(errorMessageText);
              String status = String.valueOf(errorNode.get("status").asInt());
              String statusMessage = errorNode.get("statusMessage").textValue();
              System.out.println(status);
              System.out.println(statusMessage);
              }
              catch(Exception e){
                 e.printStackTrace();
              }
  
      }
  </code></pre>