question: public static String asString ( String jsonPath , Map < String , Object > json ) { String str = null ; Object obj = atPath ( jsonPath , json ) ; if ( obj != null ) { if ( obj instanceof String ) { str = ( String ) obj ; } else { throw new IllegalStateException ( "Expected a String at path " + jsonPath + " but found " + obj + " instead! " + json ) ; } } return str ; }
target:  Helper function for reading a String value from a JSON Object tree. 