public Object parseString ( Schema schema , String input ) { checkSchemaAndInput ( schema , input ) ; if ( null == input ) { return null ; } TypeParser parser = findParser ( schema ) ; try { Object result = parser . parseString ( input , schema ) ; return result ; } catch ( Exception ex ) { String message = String . format ( "Could not parse '%s' to '%s'" , input , parser . expectedClass ( ) . getSimpleName ( ) ) ; throw new DataException ( message , ex ) ; } }
Method is used to parse String data to the proper Java types .