2017-05-12 8 views

답변

0

GSON-HAL 구현 객체 생성을 설명 할 것이다 라이브러리 위(Library Link)

Gson gson = new GsonBuilder() 
.registerTypeAdapterFactory(new HalTypeAdapterFactory()) 
.create(); 

개조 구현

RestAdapter restAdapter = new RestAdapter.Builder() 
      .setEndpoint(BASE_URL) 
      .setConverter(new GsonConverter(gson)) 
      .build(); 

그것은 주위에 작업 할 수있는 몇 가지 Missing 구성 요소가 있습니다 수정하여 도서관 방문

+1

미완성이고 버려진 것처럼 보입니다. 다른게 없니? – user1209216

+0

나는 이것이 가장 간단한 impl이라는 것을 발견했다. 그리고 나서이 자신은 ApapterFactory와 Destabilization 논리를 작성해야한다. 다른 lib하지만 약간의 작업이 필요합니다 https://github.com/Nykredit/jackson-dataformat-hal –