All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.co.mruoc.json.mask.MaskFunction Maven / Gradle / Ivy

package uk.co.mruoc.json.mask;

import com.jayway.jsonpath.Configuration;
import com.jayway.jsonpath.MapFunction;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class MaskFunction implements MapFunction {

    private final ObjectMasker masker;

    public MaskFunction(char maskChar) {
        this(new ObjectMasker(maskChar));
    }

    public MaskFunction() {
        this(new ObjectMasker());
    }

    @Override
    public Object map(Object currentValue, Configuration configuration) {
        return masker.mask(currentValue);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy