I\'m using retrofit. To catch response i\'m using Interceptor:
OkHttpClient okHttpClient = new OkHttpClient(); okHttpClient.interceptors().add(myinterceptor); >
Add this
MediaType contentType = response.body().contentType(); ResponseBody body = ResponseBody.create(contentType, jsonObject); return response.newBuilder().body(body).build();
after your response modification. jsonObject is the modified JSON you want to return.
jsonObject