I have rest service that return arraylist of object,and I have implemented jersy restful client to execute it,but I have problem in converting ZonedDateTime type to json so
public static final Gson GSON = new GsonBuilder()
.registerTypeAdapter(ZonedDateTime.class, new TypeAdapter() {
@Override
public void write(JsonWriter out, ZonedDateTime value) throws IOException {
out.value(value.toString());
}
@Override
public ZonedDateTime read(JsonReader in) throws IOException {
return ZonedDateTime.parse(in.nextString());
}
})
.enableComplexMapKeySerialization()
.create();