Skip to content

Commit

Permalink
Switch to our own classes for outputting JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed May 18, 2018
1 parent ddf1071 commit 5344028
Show file tree
Hide file tree
Showing 8 changed files with 382 additions and 317 deletions.
235 changes: 0 additions & 235 deletions java/client/src/org/openqa/selenium/json/BeanToJsonConverter.java

This file was deleted.

8 changes: 1 addition & 7 deletions java/client/src/org/openqa/selenium/json/Json.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.openqa.selenium.json;

import com.google.common.io.CharStreams;
import com.google.common.reflect.TypeToken;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
Expand All @@ -44,7 +43,6 @@ public class Json {
public static final Type OBJECT_TYPE = new TypeToken<Object>() {}.getType();

private final JsonTypeCoercer fromJson = new JsonTypeCoercer();
private final BeanToJsonConverter toJson = new BeanToJsonConverter();

public String toJson(Object toConvert) {
try (Writer writer = new StringWriter();
Expand Down Expand Up @@ -76,10 +74,6 @@ public JsonInput newInput(Reader from) throws UncheckedIOException {
}

public JsonOutput newOutput(Appendable to) throws UncheckedIOException {
try {
return new JsonOutput(toJson, GSON.newJsonWriter(CharStreams.asWriter(to)));
} catch (IOException e) {
throw new UncheckedIOException(e);
}
return new JsonOutput(to);
}
}
Loading

0 comments on commit 5344028

Please sign in to comment.