All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.dbstarll.utils.json.fastjson.JsonResponseHandlerFactory Maven / Gradle / Ivy

package io.github.dbstarll.utils.json.fastjson;

import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import io.github.dbstarll.utils.json.JsonParserResponseHandlerFactory;

public class JsonResponseHandlerFactory extends JsonParserResponseHandlerFactory {
    /**
     * 构建JsonResponseHandlerFactory.
     *
     * @param alwaysProcessEntity 在status异常时是否仍旧处理Entity
     */
    public JsonResponseHandlerFactory(final boolean alwaysProcessEntity) {
        addResponseHandler(JSONObject.class, new JsonObjectParser(), alwaysProcessEntity);
        addResponseHandler(JSONArray.class, new JsonArrayParser(), alwaysProcessEntity);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy