jodd-json/src/main/java/jodd/json/JsonParserBase.java
protected Object convertType(final Object value, final Class targetType) {
		final Class valueClass = value.getClass();

		if (valueClass == targetType) {
			return value;
		}

		try {
			return TypeConverterManager.get().convertType(value, targetType);
		}
		catch (Exception ex) {
			if (!strictTypes) {
				return null;
			}
			throw new JsonException("Type conversion failed", ex);
		}
	}
protected Object convertType(final Object value, final Class targetType) {
		final Class valueClass = value.getClass();

		if (valueClass == targetType) {
			return value;
		}

		try {
			return TypeConverterManager.get().convertType(value, targetType);
		}
		catch (Exception ex) {
			if (!strictTypes) {
				return null;
			}
			throw new JsonException("Type conversion failed", ex);
		}
	}
protected Object convertType ( final Object value , final Class targetType ) { final Class valueClass = value . getClass ( ) ; if ( valueClass == targetType ) { return value ; } try { return TypeConverterManager . get ( ) . convertType ( value , targetType ) ; } catch ( Exception ex ) { if ( ! strictTypes ) { return null ; } throw new JsonException ( "Type conversion failed" , ex ) ; } }
Converts type of the given value.
Converts type of the given value .