Skip to content

Commit

Permalink
fix: bug where backslash automatically removed from json string value
Browse files Browse the repository at this point in the history
  • Loading branch information
mattebit committed Jan 18, 2024
1 parent be4af83 commit 2779eaa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tool/src/main/java/migt/Tools.java
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,14 @@ public static String editJson(EditOperation.Jwt_action action,
vars.add(v);
break;
}
return Configuration.defaultConfiguration().jsonProvider().toJson(document); //basically converts to string

// This difference has been added because the parsed documed removed backslashes from the content even if it
// was not modified (like if it was just a save)
if (!(action == EditOperation.Jwt_action.SAVE)) {
return Configuration.defaultConfiguration().jsonProvider().toJson(document); //basically converts to string
} else {
return content;
}
}

/**
Expand Down

0 comments on commit 2779eaa

Please sign in to comment.