MCPcopy Create free account
hub / github.com/grpc/grpc-java / getListOfObjects

Method getListOfObjects

core/src/main/java/io/grpc/internal/JsonUtil.java:56–63  ·  view source on GitHub ↗

Gets a list from an object for the given key, and verifies all entries are objects. If the key is not present, this returns null. If the value is not a List or an entry is not an object, throws an exception.

(Map<String, ?> obj, String key)

Source from the content-addressed store, hash-verified

54 * throws an exception.
55 */
56 @Nullable
57 public static List<Map<String, ?>> getListOfObjects(Map<String, ?> obj, String key) {
58 List<?> list = getList(obj, key);
59 if (list == null) {
60 return null;
61 }
62 return checkObjectList(list);
63 }
64
65 /**
66 * Gets a list from an object for the given key, and verifies all entries are strings. If the key

Calls 2

getListMethod · 0.95
checkObjectListMethod · 0.95