JSONObject jsonObject = Optional.ofNullable(orderItemWithBLOBs.getCustomData()) .map(JSONObject::parseObject) .orElse(new JSONObject());

使用函数式编程将字符串转换为JSONObject