code: private String getTextField(JsonNode json, String fieldName) {
          if (!json.has(fieldName)) {
              return null;
          }
          return json.get(fieldName).asText();
      }
docs: Get a String field from the JSON.
  
  @param json      JSON document.
  @param fieldName Field name to get.
  @return String value of field or null if not present.