List of usage examples for org.openqa.selenium.json JsonOutput name
public JsonOutput name(String name)
From source file:io.appium.java_client.remote.NewAppiumSessionPayload.java
License:Apache License
private void writeMetaData(JsonOutput out) throws IOException { CharSource charSource = backingStore.asByteSource().asCharSource(UTF_8); try (Reader reader = charSource.openBufferedStream(); JsonInput input = json.newInput(reader)) { input.beginObject();/*from w ww . j a v a2 s. co m*/ while (input.hasNext()) { String name = input.nextName(); switch (name) { case CAPABILITIES: case DESIRED_CAPABILITIES: case REQUIRED_CAPABILITIES: input.skipValue(); break; default: out.name(name); out.write(input.read(Object.class)); break; } } } }