@SuppressWarnings("unchecked")
	protected static <T> T jsonConvert(Type targetType, Object value, boolean ignoreError) throws ConvertException {
		if (JSONUtil.isNull(value)) {
			return null;
		}
		
		Object targetValue = null;
		try {
			targetValue = Convert.convert(targetType, value);
		} catch (ConvertException e) {
			if (ignoreError) {
				return null;
			}
			throw e;
		}
		
		if (null == targetValue && false == ignoreError) {
			if (StrUtil.isBlankIfStr(value)) {
				// 对于传入空字符串的情况，如果转换的目标对象是非字符串或非原始类型，转换器会返回false。
				// 此处特殊处理，认为返回null属于正常情况
				return null;
			}
			
			throw new ConvertException("Can not convert {} to type {}", value, ObjectUtil.defaultIfNull(TypeUtil.getClass(targetType), targetType));
		}

		return (T) targetValue;
	}
@ SuppressWarnings ( "unchecked" ) protected static < T > T jsonConvert ( Type targetType , Object value , boolean ignoreError ) throws ConvertException { if ( JSONUtil . isNull ( value ) ) { return null ; } Object targetValue = null ; try { targetValue = Convert . convert ( targetType , value ) ; } catch ( ConvertException e ) { if ( ignoreError ) { return null ; } throw e ; } if ( null == targetValue && false == ignoreError ) { if ( StrUtil . isBlankIfStr ( value ) ) { return null ; } throw new ConvertException ( "Can not convert {} to type {}" , value , ObjectUtil . defaultIfNull ( TypeUtil . getClass ( targetType ) , targetType ) ) ; } return ( T ) targetValue ; }
JSON递归转换<br>
首先尝试JDK类型转换，如果失败尝试JSON转Bean
@param <T>

@param targetType 目标类型
@param value 值
@param ignoreError 是否忽略转换错误
@return 目标类型的值
@throws ConvertException 转换失败