How can you pass a List<objects that implement an interface> to a method?
For generic wildcards the keyword extends
works for both classes and interfaces:
private String getListAsJson(List<? extends JsonEnabled> list) { ... }
extends
has slightly different meaning when used for defining generic bounds - it essentially translates to "is, or extends, or implements".
Why don't just use
private String getListAsJson(List<JsonEnabled> list) { ... }
?