Skip to content

Commit

Permalink
check if isJsonNull before getAsString
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Nov 30, 2023
1 parent e78c746 commit 451a200
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,10 @@ public String getValue() {
return value.getAsJsonObject().toString();
} else if (value.isJsonArray()) {
return value.getAsJsonArray().toString();
} else {
} else if (!value.isJsonNull){
return "\"" + value.getAsString() + "\"";
} else {
return "\"" + value.toString() + "\"";
} // if else if
} // getValue

Expand Down

0 comments on commit 451a200

Please sign in to comment.