public class JSONEngineFactory extends Object
| Constructor and Description |
|---|
JSONEngineFactory() |
| Modifier and Type | Method and Description |
|---|---|
static JSONEngine |
createEngine()
根据用户引入的JSON引擎jar,自动创建对应的JSON引擎对象
推荐创建的引擎单例使用,此方法每次调用会返回新的引擎 |
static JSONEngine |
createEngine(JSONEngineConfig config)
根据用户引入的JSON引擎jar,自动创建对应的HTTP客户端引擎对象
推荐创建的引擎单例使用,此方法每次调用会返回新的引擎 |
static JSONEngine |
createEngine(String engineName)
创建自定义引擎
|
static JSONEngine |
getEngine()
获得单例的ClientEngine
|
public static JSONEngine getEngine()
public static JSONEngine createEngine(String engineName) throws JSONException
engineName - 引擎名称,忽略大小写,如`FastJSON2`、`Jackson`、`Gson`、`HutoolJSON`JSONException - 无对应名称的引擎public static JSONEngine createEngine(JSONEngineConfig config)
config - JSON引擎配置JSONEnginepublic static JSONEngine createEngine()
JSONEngineCopyright © 2024. All rights reserved.