remove deprecated

This commit is contained in:
Looly
2022-04-28 01:51:06 +08:00
parent d78219c60c
commit af1d615ca9
29 changed files with 32 additions and 1436 deletions

View File

@@ -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}表示不排序,不排序情况下,按照加入顺序排序

View File

@@ -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},将此键移除
*

View File

@@ -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字符串
*