Skip to content
v2.275.0

JsonProcessingOptions Struct ​

Define options which can be passed using the method Source.jsonData().

Example ​

ts
declare const bucket: s3.Bucket;
declare const param: ssm.StringParameter;

// Example with a secret value that contains double quotes
const deployment = new s3deploy.BucketDeployment(this, 'JsonDeployment', {
  sources: [
    s3deploy.Source.jsonData('config.json', {
      api_endpoint: 'https://api.example.com',
      secretValue: param.stringValue, // value with double quotes
      config: {
        enabled: true,
        features: ['feature1', 'feature2']
      }
    },
    // Enable escaping at deployment time
    { escape: true },
    )
  ],
  destinationBucket: bucket,
});

Properties ​

escapeoptionalbooleanescapeoptionalboolescapeoptionalBooleanEscapeoptionalboolEscapeoptional*bool= false#
If set to `true`, the marker substitution will make sure the value inserted in the file will be a valid JSON string.