You'll have to declare a container object, but otherwise, it's quite simple:
// This is your Foo
public class MyObj {
public String key;
// Just for clarity
@Override
public String toString() {
return "MyObj{" +
"key='" + this.key + '\'' +
'}';
}
}
// This is the container
public class MyArray {
// Property is mandatory in this case
@JsonProperty("objs")
List<MyObj> objs;
}
And now the parsing
public static void main(final String[] args) {
// Your input is a JSON array, not a JSON object
final String input = "[{\"key\":\"a\"}, {\"key\":\"b\"}, {\"key\":\"c\"}]";
// We format it to be a JSON object, so we can parse it
final MyArray res = Json.decodeValue(String.format("{\"objs\":%s}", input), MyArray.class);
// Get your List out
System.out.println(res.objs);
}