public static JsonNode getFirstNode ( final String text , final String path ) { try { JsonNode node = mapper . readValue ( text , JsonNode . class ) ; if ( path != null ) { node = ( JsonNode ) getElement ( node , path ) ; } return node ; } catch ( final IOException e ) { logger . error ( "Cannot get first node" , e ) ; } return null ; }
Return the first node of a JSON response .