mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-06-08 02:04:04 +08:00
日志解析json报错
This commit is contained in:
parent
935ee6a500
commit
f3103559d5
@ -153,14 +153,14 @@ public class AdminLogAspect {
|
|||||||
public JSONObject excludeProperties(String jsonData) {
|
public JSONObject excludeProperties(String jsonData) {
|
||||||
JSONObject jsonObjectResult = new JSONObject();
|
JSONObject jsonObjectResult = new JSONObject();
|
||||||
// 把传入String类型转换成JSONObject对象
|
// 把传入String类型转换成JSONObject对象
|
||||||
if (JSONUtil.isTypeJSON(jsonData)) {
|
if (JSONUtil.isTypeJSONObject(jsonData)) {
|
||||||
JSONObject jsonObject = JSONUtil.parseObj(jsonData);
|
JSONObject jsonObject = JSONUtil.parseObj(jsonData);
|
||||||
for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
|
for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
|
||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
Object value = entry.getValue();
|
Object value = entry.getValue();
|
||||||
if (StringUtil.isNotNull(value)) {
|
if (StringUtil.isNotNull(value)) {
|
||||||
// 如果value依旧是json类型的话继续递归解析
|
// 如果value依旧是json类型的话继续递归解析
|
||||||
if (JSONUtil.isTypeJSON(value.toString())) {
|
if (JSONUtil.isTypeJSONObject(value.toString())) {
|
||||||
jsonObjectResult.put(key, excludeProperties(entry.getValue().toString()));
|
jsonObjectResult.put(key, excludeProperties(entry.getValue().toString()));
|
||||||
} else {
|
} else {
|
||||||
// 如果value是单纯的数据,执行脱敏操作
|
// 如果value是单纯的数据,执行脱敏操作
|
||||||
|
Loading…
x
Reference in New Issue
Block a user