mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
remove deprecated
This commit is contained in:
@@ -53,30 +53,6 @@ public class JSONConfig implements Serializable {
|
||||
return new JSONConfig();
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有序,顺序按照加入顺序排序,只针对JSONObject有效
|
||||
*
|
||||
* @return 是否有序
|
||||
* @deprecated 始终返回 {@code true}
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isOrder() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否有序,顺序按照加入顺序排序,只针对JSONObject有效
|
||||
*
|
||||
* @param order 是否有序
|
||||
* @return this
|
||||
* @deprecated 始终有序,无需设置
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Deprecated
|
||||
public JSONConfig setOrder(boolean order) {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取键排序规则<br>
|
||||
* 键排序规则,{@code null}表示不排序,不排序情况下,按照加入顺序排序
|
||||
|
@@ -62,32 +62,6 @@ public class JSONObject extends MapWrapper<String, Object> implements JSON, JSON
|
||||
this(DEFAULT_CAPACITY, isOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
* @param capacity 初始大小
|
||||
* @param isOrder 是否有序
|
||||
* @since 3.0.9
|
||||
*/
|
||||
public JSONObject(int capacity, boolean isOrder) {
|
||||
this(capacity, false, isOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
* @param capacity 初始大小
|
||||
* @param isIgnoreCase 是否忽略KEY大小写
|
||||
* @param isOrder 是否有序
|
||||
* @since 3.3.1
|
||||
* @deprecated isOrder无效
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Deprecated
|
||||
public JSONObject(int capacity, boolean isIgnoreCase, boolean isOrder) {
|
||||
this(capacity, JSONConfig.create().setIgnoreCase(isIgnoreCase));
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
@@ -331,21 +305,6 @@ public class JSONObject extends MapWrapper<String, Object> implements JSON, JSON
|
||||
BeanPath.create(expression).set(this, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* PUT 键值对到JSONObject中,在忽略null模式下,如果值为{@code null},将此键移除
|
||||
*
|
||||
* @param key 键
|
||||
* @param value 值对象. 可以是以下类型: Boolean, Double, Integer, JSONArray, JSONObject, Long, String, or the JSONNull.NULL.
|
||||
* @return this.
|
||||
* @throws JSONException 值是无穷数字抛出此异常
|
||||
* @deprecated 此方法存在歧义,原Map接口返回的是之前的值,重写后返回this了,未来版本此方法会修改,请使用{@link #set(String, Object)}
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public JSONObject put(String key, Object value) throws JSONException {
|
||||
return set(key, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置键值对到JSONObject中,在忽略null模式下,如果值为{@code null},将此键移除
|
||||
*
|
||||
|
@@ -125,22 +125,6 @@ public class JSONUtil {
|
||||
return new JSONObject(obj, ignoreNullValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON字符串转JSONObject对象
|
||||
*
|
||||
* @param obj Bean对象或者Map
|
||||
* @param ignoreNullValue 是否忽略空值,如果source为JSON字符串,不忽略空值
|
||||
* @param isOrder 是否有序
|
||||
* @return JSONObject
|
||||
* @since 4.2.2
|
||||
* @deprecated isOrder参数不再有效
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Deprecated
|
||||
public static JSONObject parseObj(Object obj, boolean ignoreNullValue, boolean isOrder) {
|
||||
return new JSONObject(obj, ignoreNullValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON字符串转JSONArray
|
||||
*
|
||||
@@ -826,19 +810,6 @@ public class JSONUtil {
|
||||
return JSONStrFormatter.format(jsonStr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为JSON字符串,首尾都为大括号或中括号判定为JSON字符串
|
||||
*
|
||||
* @param str 字符串
|
||||
* @return 是否为JSON字符串
|
||||
* @since 3.3.0
|
||||
* @deprecated 方法名称有歧义,请使用 {@link #isTypeJSON(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean isJson(String str) {
|
||||
return isTypeJSON(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为JSON类型字符串,首尾都为大括号或中括号判定为JSON字符串
|
||||
*
|
||||
@@ -850,19 +821,6 @@ public class JSONUtil {
|
||||
return isTypeJSONObject(str) || isTypeJSONArray(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为JSONObject字符串,首尾都为大括号判定为JSONObject字符串
|
||||
*
|
||||
* @param str 字符串
|
||||
* @return 是否为JSON字符串
|
||||
* @since 3.3.0
|
||||
* @deprecated 方法名称有歧义,请使用 {@link #isTypeJSONObject(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean isJsonObj(String str) {
|
||||
return isTypeJSONObject(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为JSONObject类型字符串,首尾都为大括号判定为JSONObject字符串
|
||||
*
|
||||
@@ -877,19 +835,6 @@ public class JSONUtil {
|
||||
return StrUtil.isWrap(StrUtil.trim(str), '{', '}');
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为JSONArray字符串,首尾都为中括号判定为JSONArray字符串
|
||||
*
|
||||
* @param str 字符串
|
||||
* @return 是否为JSON字符串
|
||||
* @since 3.3.0
|
||||
* @deprecated 方法名称有歧义,请使用 {@link #isTypeJSONArray(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean isJsonArray(String str) {
|
||||
return isTypeJSONArray(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为JSONArray类型的字符串,首尾都为中括号判定为JSONArray字符串
|
||||
*
|
||||
|
Reference in New Issue
Block a user