So other JSON parsing libraries can be used support sanitisation of both whole JSON and individual values via java.lang.CharSequence.
Examples:
javax.json.JsonString node = ...
CharSequence sanitised = JsonSanitizer.sanitiseValue(node.getChars());
For situations such as a StringBuilder or StringBuffer it could also have the option to not create a new instance and edit in place to avoid GC churn related to String creation.
So other JSON parsing libraries can be used support sanitisation of both whole JSON and individual values via
java.lang.CharSequence.Examples:
For situations such as a
StringBuilderorStringBufferit could also have the option to not create a new instance and edit in place to avoid GC churn related toStringcreation.