Class JSONObfuscator
java.lang.Object
com.github.robtimus.obfuscation.Obfuscator
com.github.robtimus.obfuscation.jackson.JSONObfuscator
An obfuscator that obfuscates JSON properties in
CharSequences or the contents of Readers.
This class supports both Jackson 2 and Jackson 3, depending on the available runtime dependencies. It prefers Jackson 3 if both are available.
An explicit version can be defined using JSONObfuscator.Builder.withJacksonVersion(JacksonVersion).
- Author:
- Rob Spoor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA builder forJSONObfuscators.static interfaceAn object that can be used to configure handling when the obfuscated result exceeds a pre-defined limit.static interfaceAn object that can be used to configure a property that should be obfuscated.Nested classes/interfaces inherited from class com.github.robtimus.obfuscation.Obfuscator
Obfuscator.ObfuscatorFunction, Obfuscator.PortionBuilder, Obfuscator.Prefix, Obfuscator.SplitPoint -
Method Summary
Modifier and TypeMethodDescriptionstatic JSONObfuscator.Builderbuilder()Returns a builder that will createJSONObfuscators.final booleanfinal inthashCode()final voidobfuscateText(Reader input, Appendable destination) final CharSequenceobfuscateText(CharSequence s, int start, int end) final voidobfuscateText(CharSequence s, int start, int end, Appendable destination) final WriterstreamTo(Appendable destination) final StringtoString()Methods inherited from class com.github.robtimus.obfuscation.Obfuscator
all, all, fixedLength, fixedLength, fixedValue, fromFunction, fromFunction, none, obfuscateCollection, obfuscateCollection, obfuscateList, obfuscateList, obfuscateMap, obfuscateMap, obfuscateObject, obfuscateObject, obfuscateSet, obfuscateSet, obfuscateText, obfuscateText, obfuscateText, obfuscateText, obfuscateText, obfuscateText, obfuscateText, portion, untilLength
-
Method Details
-
obfuscateText
- Specified by:
obfuscateTextin classObfuscator
-
obfuscateText
public final void obfuscateText(CharSequence s, int start, int end, Appendable destination) throws IOException - Specified by:
obfuscateTextin classObfuscator- Throws:
IOException
-
obfuscateText
- Specified by:
obfuscateTextin classObfuscator- Throws:
IOException
-
streamTo
- Specified by:
streamToin classObfuscator
-
equals
-
hashCode
public final int hashCode() -
toString
-
builder
Returns a builder that will createJSONObfuscators.- Returns:
- A builder that will create
JSONObfuscators.
-