code: public static <T> T getObjectFromJson(Class<T> classEntity, LinkedMapWritable jsonObject)
              throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException {
          T t = classEntity.newInstance();
  
          Field[] fields = AnnotationUtils.filterDeepFields(classEntity);
  
          Object insert;
  
          for (Field field : fields) {
              Method method = Utils.findSetter(field.getName(), classEntity, field.getType());
  
              Class<?> classField = field.getType();
              String key = AnnotationUtils.deepFieldName(field);
              Text text = new org.apache.hadoop.io.Text(key);
              Writable currentJson = jsonObject.get(text);
              if (currentJson != null) {
  
                  if (Iterable.class.isAssignableFrom(classField)) {
                      Type type = field.getGenericType();
                      insert = subDocumentListCase(type, (ArrayWritable) currentJson);
                      method.invoke(t, (insert));
  
                  } else if (IDeepType.class.isAssignableFrom(classField)) {
                      insert = getObjectFromJson(classField, (LinkedMapWritable) currentJson);
                      method.invoke(t, (insert));
                  } else {
                      insert = currentJson;
                      try {
                          method.invoke(t, getObjectFromWritable((Writable) insert));
                      } catch (Exception e) {
                          LOG.error("impossible to convert field " + t + " :" + field + " error: " + e.getMessage());
                          method.invoke(t, Utils.castNumberType(getObjectFromWritable((Writable) insert), t.getClass()));
                      }
  
                  }
  
              }
          }
  
          return t;
      }
docs: converts from JSONObject to an entity class with deep's anotations
  
  @param classEntity the entity name.
  @param jsonObject  the instance of the JSONObject to convert.
  @param <T>         return type.
  @return the provided JSONObject converted to an instance of T.
  @throws IllegalAccessException
  @throws InstantiationException
  @throws java.lang.reflect.InvocationTargetException