# JsonProcessingOptions

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

- Source: [`aws-s3-deployment/lib/source.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-s3-deployment/lib/source.ts#L56)
- Type last changed: v2.190.0 · 17 Apr 2025

## 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

- `escape`: boolean = false — If set to `true`, the marker substitution will make sure the value inserted in the file will be a valid JSON string.
