Package hudson.plugins.octopusdeploy
Class JSONSanitizer
- java.lang.Object
-
- hudson.plugins.octopusdeploy.JSONSanitizer
-
public class JSONSanitizer extends java.lang.Object
Simple JSON sanitizer to allow special characters in JSON input. It also replaces control characters (newline, tab) and replaces them with html-friendly versions
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JSONSanitizer
getInstance()
java.lang.String
sanitize(java.lang.String dirtyString)
Sanitizes the input string so that it can be represented in JSON
-
-
-
Method Detail
-
getInstance
public static JSONSanitizer getInstance()
-
sanitize
public java.lang.String sanitize(java.lang.String dirtyString)
Sanitizes the input string so that it can be represented in JSON- Parameters:
dirtyString
- The un-sanitized string- Returns:
- The sanitized string that can be directly added to a JSON command
-
-