MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / fromJson

Method fromJson

java/src/org/openqa/selenium/grid/data/Slot.java:47–82  ·  view source on GitHub ↗
(JsonInput input)

Source from the content-addressed store, hash-verified

45 }
46
47 @SuppressWarnings({"unused", "DataFlowIssue"})
48 private static Slot fromJson(JsonInput input) {
49 SlotId id = null;
50 Capabilities stereotype = null;
51 Instant lastStarted = null;
52 Session session = null;
53
54 input.beginObject();
55 while (input.hasNext()) {
56 String name = input.nextName();
57 switch (name) {
58 case "id":
59 id = input.read(SlotId.class);
60 break;
61
62 case "lastStarted":
63 lastStarted = input.read(Instant.class);
64 break;
65
66 case "session":
67 session = input.read(Session.class);
68 break;
69
70 case "stereotype":
71 stereotype = input.read(Capabilities.class);
72 break;
73
74 default:
75 input.skipValue();
76 break;
77 }
78 }
79 input.endObject();
80
81 return new Slot(id, stereotype, lastStarted, session);
82 }
83
84 private Map<String, @Nullable Object> toJson() {
85 Map<String, @Nullable Object> toReturn = new TreeMap<>();

Callers

nothing calls this directly

Calls 6

hasNextMethod · 0.80
nextNameMethod · 0.80
skipValueMethod · 0.80
readMethod · 0.65
beginObjectMethod · 0.45
endObjectMethod · 0.45

Tested by

no test coverage detected