Commit 0ef7b11a authored by yanzg's avatar yanzg

添加对Android的支持

parent 213a64bd
...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.TypeReference; ...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.TypeReference;
/** /**
* JSON序列化的处理 * JSON序列化的处理
*
* @author 颜佐光 * @author 颜佐光
*/ */
public class JsonHelper { public class JsonHelper {
...@@ -82,5 +83,18 @@ public class JsonHelper { ...@@ -82,5 +83,18 @@ public class JsonHelper {
return JSON.toJSONString(value, isLine); return JSON.toJSONString(value, isLine);
} }
/**
* JSON对比对象值
*
* @param from  来源对象
* @param to  目标对象
* @return 对比结果
*/
public static boolean compare(Object from, Object to) {
return StringHelper.compare(
JsonHelper.serialize(from),
JsonHelper.serialize(to),
false);
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment