Skip to content

Commit

Permalink
Replace JacksonFactory with GsonFactory.
Browse files Browse the repository at this point in the history
  • Loading branch information
Capstan committed Jun 28, 2022
1 parent 44933a4 commit 6af1452
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions endpoints-framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ dependencies {
compile group: 'com.google.appengine', name: 'appengine-api-1.0-sdk', version: appengineVersion
compile group: 'com.google.flogger', name: 'flogger', version: floggerVersion
runtime group: 'com.google.flogger', name: 'flogger-system-backend', version: floggerVersion
compile(group: 'com.google.http-client', name: 'google-http-client-jackson2', version: apiclientVersion) {
compile(group: 'com.google.http-client', name: 'google-http-client-gson', version: apiclientVersion) {
exclude group: 'com.google.guava', module: 'guava-jdk5'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
}
compile(group: 'com.google.api-client', name: 'google-api-client', version: apiclientVersion) {
exclude group: 'com.google.guava', module: 'guava-jdk5'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.google.api.client.http.javanet.NetHttpTransport;
import com.google.api.client.json.JsonFactory;
import com.google.api.client.json.JsonObjectParser;
import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.client.json.gson.GsonFactory;
import com.google.common.annotations.VisibleForTesting;

/**
Expand All @@ -43,7 +43,7 @@ public class Client {
} else {
transport = new NetHttpTransport();
}
jsonFactory = new JacksonFactory();
jsonFactory = GsonFactory.getDefaultInstance();
jsonHttpRequestFactory = transport.createRequestFactory(new HttpRequestInitializer() {
@Override
public void initialize(HttpRequest request) {
Expand Down

0 comments on commit 6af1452

Please sign in to comment.