Skip to content

Commit

Permalink
fix: When you append a string to the workflow context, the value has …
Browse files Browse the repository at this point in the history
…multiple double quotes.(PowerJob#307)
  • Loading branch information
dudiao authored and Echo009 committed Aug 26, 2022
1 parent 6a38f7c commit 82702e7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public class JsonUtils {
}

public static String toJSONString(Object obj) {
if (obj instanceof String) {
return (String) obj;
}
try {
return objectMapper.writeValueAsString(obj);
}catch (Exception ignore) {
Expand All @@ -30,6 +33,9 @@ public static String toJSONString(Object obj) {
}

public static String toJSONStringUnsafe(Object obj) {
if (obj instanceof String) {
return (String) obj;
}
try {
return objectMapper.writeValueAsString(obj);
}catch (Exception e) {
Expand Down

0 comments on commit 82702e7

Please sign in to comment.