JSON Mask (JsonMaskGenerator)
The JSON Mask generator runs a selected generator on values that match a specified JSONPath.
Link object structure
For the JSON Mask generator, you provide a link object for each sub-generator configuration.
The generator does not itself support consistency or differential privacy.
The metadata
object is populated from the JsonMaskMetadata
object, and includes:
pathExpression
, which is the JSONPath that identifies the value to apply the sub-generator to.The types of values to apply the sub-generator to.
The
subGeneratorMetadata
object, which identifies and configures the sub-generator.
Here is the basic structure of a link object for a JSON Mask sub-generator.
Example replacement
In the following example replacement for the JSON Mask generator:
The Date Truncation generator is applied to all values of the JSONPath expression
$[*].start
. The value is truncated to the year, and the birthdate flag is off.The Email generator is applied to all values of the JSONPath expression
$[0].email
. The generated email addresses all use gmail.com as the domain, and no domains are excluded. Invalid email addresses are replaced. Consistency is disabled.If there is an error applying those generators, then the fallback generator is the Null generator.
Last updated