MCPcopy
hub / github.com/SeleniumHQ/selenium / fromJson

Method fromJson

java/src/org/openqa/selenium/remote/Command.java:81–112  ·  view source on GitHub ↗
(JsonInput input)

Source from the content-addressed store, hash-verified

79 }
80
81 private static Command fromJson(JsonInput input) {
82 input.beginObject();
83
84 SessionId sessionId = null;
85 String name = null;
86 Map<String, Object> parameters = null;
87
88 while (input.hasNext()) {
89 switch (input.nextName()) {
90 case "name":
91 name = input.nextString();
92 break;
93
94 case "parameters":
95 parameters = input.read(MAP_TYPE);
96 break;
97
98 case "sessionId":
99 sessionId = input.read(SessionId.class);
100 break;
101
102 default:
103 input.skipValue();
104 break;
105 }
106 }
107
108 input.endObject();
109
110 //noinspection DataFlowIssue
111 return new Command(sessionId, name, parameters);
112 }
113}

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected