Array JSON Mask (ArrayJsonMaskGenerator)
The Array JSON Mask generator is a composite generator. It is a version of the JSON Mask generator that can be used for array values. It runs a selected generator on values that match a specified JSONPath.
Link object structure
For the Array 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. For the Array JSON Mask generator, metadata
includes:
pathExpression
, which is the path expression 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 an Array JSON Mask sub-generator.
{
"schema": "string",
"table": "string",
"column": "string",
"metadata": {
"generatorId": "ArrayJsonMaskGenerator",
"presetId": "ArrayJsonMaskGenerator",
"customValueProcessor": "string", //If custom value processor applied to the generator
"pathExpression": "string",
"jsonFilterTypes": [ enum ],
"subGeneratorMetadata": {
"generatorId": "string",
"presetId": "string",
//Metadata for the selected sub-generator
"customValueProcessor": "string" //If custom value processor applied to the sub-generator
}
}
}
Example replacement
The following example replacement applies the built-in generator preset for the Geo generator to the value at the specified path expression.
The configuration for the Geo generator indicates that it is a latitude value.
{
"name": "location",
"schema": "public",
"table": "offices",
"links": [
{
"schema": "public",
"table": "offices",
"column": "location",
"metadata": {
"generatorId": "ArrayJsonMaskGenerator",
"presetId": "ArrayJsonMaskGenerator",
"pathExpression": "$.value",
"jsonFilterTypes": [
0
],
"subGeneratorMetadata": {
"presetId": "GeoGenerator",
"generatorId": "GeoGenerator",
"geoType": "Latitude"
}
}
}
]
}
Last updated
Was this helpful?