com.github.devswork.util.JSON4FastJSON Maven / Gradle / Ivy
package com.github.devswork.util;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.parser.ParserConfig;
import com.alibaba.fastjson.util.FieldInfo;
import com.alibaba.fastjson.util.TypeUtils;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class JSON4FastJSON {
public static Object toJSON(Object javaObject) {
ParserConfig mapping = ParserConfig.getGlobalInstance();
if (javaObject == null) {
return null;
}
if (javaObject instanceof JSON4FastJSON) {
return javaObject;
}
if (javaObject instanceof Map) {
Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy