MCPcopy
hub / github.com/google/gson / get

Method get

src/main/java/com/google/gson/JsonObject.java:154–160  ·  view source on GitHub ↗

Returns the member with the specified name. @param memberName name of the member that is being requested. @return the member matching the name. Null if no such member exists.

(String memberName)

Source from the content-addressed store, hash-verified

152 * @return the member matching the name. Null if no such member exists.
153 */
154 public JsonElement get(String memberName) {
155 if (members.containsKey(memberName)) {
156 JsonElement member = members.get(memberName);
157 return member == null ? JsonNull.createJsonNull() : member;
158 }
159 return null;
160 }
161
162 /**
163 * Convenience method to get the specified member as a JsonPrimitive element.

Calls 1

createJsonNullMethod · 0.95