Skip to content

Commit 9e258f3

Browse files
committed
Update and rename JsonUtils.java to JSONUtils.java
1 parent 7b8c244 commit 9e258f3

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

job-core/src/main/java/com/lts/job/core/util/JsonUtils.java renamed to job-core/src/main/java/com/lts/job/core/util/JSONUtils.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,25 @@
99
/**
1010
* @author Robert HG (254963746@qq.com) on 6/23/14.
1111
*/
12-
public class JsonUtils {
12+
public class JSONUtils {
1313

14-
private JsonUtils() {
15-
}
16-
17-
public static <T> T jsonToObject(String json, Type type) {
14+
public static <T> T parse(String json, Type type) {
1815
return (T) JSONObject.parseObject(json, type);
1916
}
2017

21-
public static String objectToJsonString(Object obj) {
18+
public static String toJSONString(Object obj) {
2219
return JSONObject.toJSONString(obj);
2320
}
2421

25-
public static JSONObject objectToJson(Object obj) {
22+
public static JSONObject toJSON(Object obj) {
2623
return (JSONObject) JSONObject.toJSON(obj);
2724
}
2825

29-
public static JSONArray strToJsonArray(String obj) {
26+
public static JSONArray parseArray(String obj) {
3027
return JSON.parseArray(obj);
3128
}
3229

33-
public static JSONObject strToJson(String obj) {
30+
public static JSONObject parseObject(String obj) {
3431
return JSON.parseObject(obj);
3532
}
3633

0 commit comments

Comments
 (0)