I saw several questions about generic return type, but none answers my question.
If there is no bound for any of the arguments, such as the following method in JayWay :
There is nothing functionally different between the two. The byte-code will probably be identical.
The core difference is that one uses a cast while the otrher uses generics.
I would generally try to avoid casting if there is any alternative mechanism and as the generic form is a perfectly effective alternative I would go for that.
// The right way.
JsonPath.read(currentRule, "$.logged");