@ Override public Object read ( InputStream inputStream , Type type ) throws IOException { try { return json . parse ( new InputStreamReader ( inputStream , "UTF-8" ) , type ) ; } catch ( JsonException | ClassCastException | UnsupportedEncodingException e ) { throw new IllegalArgumentException ( e . getMessage ( ) ) ; } }
Parse JSON from input stream accordingly given type . Return parsed object .