hawk icon indicating copy to clipboard operation
hawk copied to clipboard

Extract GsonParser into another artifact and provide other parsers such as Jackson etc

Open orhanobut opened this issue 7 years ago • 1 comments

Hawk requires Gson to serialize/deserialize the value. There is a way to invert this dependency by using Parser interface but transitively Gson will be added to the final apk. In order to avoid that, both consumer and Hawk should depend on abstraction and concrete implementation should be provided by the consumer.

Hawk.init(context)
  .setParser(new GsonParser())
  .build();

orhanobut avatar Mar 30 '18 08:03 orhanobut

Like retrofit converter, add a built in converter and some third part converters.

shenghaiyang avatar Jul 03 '18 10:07 shenghaiyang