package com.gh.gamecenter.common.retrofit;

import org.json.JSONObject;

import okhttp3.ResponseBody;

/**
 * Created by LGT on 2016/11/7.
 * JSONObject
 */
public class JSONObjectResponse extends Response<ResponseBody> {

    @Override
    public void onResponse(ResponseBody responseBody) {
        try {
            onResponse(new JSONObject(responseBody.string()));
        } catch (Exception e) {
            onError(e);
        }
    }

    public void onResponse(JSONObject response) {

    }

}
