mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
fix: workflow append string will have quotes #307
This commit is contained in:
parent
93b01191d0
commit
2a87a24980
@ -32,6 +32,9 @@ public class JsonUtils {
|
||||
}
|
||||
|
||||
public static String toJSONString(Object obj) {
|
||||
if (obj instanceof String) {
|
||||
return (String) obj;
|
||||
}
|
||||
try {
|
||||
return JSON_MAPPER.writeValueAsString(obj);
|
||||
}catch (Exception e) {
|
||||
@ -41,6 +44,9 @@ public class JsonUtils {
|
||||
}
|
||||
|
||||
public static String toJSONStringUnsafe(Object obj) {
|
||||
if (obj instanceof String) {
|
||||
return (String) obj;
|
||||
}
|
||||
try {
|
||||
return JSON_MAPPER.writeValueAsString(obj);
|
||||
}catch (Exception e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user