Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Replace JacksonFactory with GsonFactory. #211

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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