Search
⌃K
Links

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.
For the Array JSON Mask generator, you provide a link object for each sub-generator configuration.
The link object identifies the path expression and the sub-generator to run on the matching values.
The Array JSON Mask generator does not itself support consistency or differential privacy.
The metadata object is populated from the JsonMaskMetadata object, which includes:
  • The sub-generator type.
  • The types of values to apply the sub-generator to.
  • The subGeneratorMetadata object, which contains the generator configuration for the sub-generator.
Here is the basic structure of a link object for an Array JSON Mask sub-generator.
{
"generatorId": "ArrayJsonMaskGenerator",
"presetId": "ArrayJsonMaskGenerator",
"schema": "string",
"table": "string",
"column": "string",
"pathExpression": "string",
"subGeneratorId": "string",
"metadata": {
"subPresetId": "string",
"subGeneratorId": "string",
"jsonFilterTypes": [ enum ],
"subGeneratorMetadata": {
//Metadata for the selected sub-generator type
}
},
"customValueProcessor": "string", //If custom value processor applied to the generator
"customSubGeneratorValueProcessor": "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": [
{
"generatorId": "ArrayJsonMaskGenerator",
"presetId": "ArrayJsonMaskGenerator",
"schema": "public",
"table": "offices",
"column": "location",
"pathExpression": "$.value",
"subGeneratorId": "GeoGenerator",
"metadata": {
"subPresetId": "GeoGenerator",
"subGeneratorId": "GeoGenerator",
"jsonFilterTypes": [
0
],
"subGeneratorMetadata": {
"geoType": "Latitude"
}
}
}
]
}