public class FieldNameBasedFieldMasker extends Object implements FieldMasker
Constructor and Description |
---|
FieldNameBasedFieldMasker(Set<String> fieldNamesToMask,
Object mask) |
Modifier and Type | Method and Description |
---|---|
Object |
mask(JsonStreamContext context)
If the field at the JSON stream context's current path should be masked,
then returns the masked value to write as the field's value.
|
public Object mask(JsonStreamContext context)
FieldMasker
MaskingJsonGenerator
will write the returned masked value
as the field's value (instead of the original field's value).
If the JSON stream context's current path should NOT be masked, returns null.
mask
in interface FieldMasker
context
- the current JSON stream context, which can be used to determine the path within the JSON output.NullNode.instance
.
To write , the return MaskingJsonGenerator.MASK
Copyright © 2020. All rights reserved.