# SourceDataOptions

Options for `Source.data()` sources.

Used as argument in: [Source.data](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_deployment.Source.html#data)

- Source: [`aws-s3-deployment/lib/source.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-s3-deployment/lib/source.ts#L50)
- Type last changed: v2.276.0 · 10 Nov 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3_deployment as s3_deployment } from 'aws-cdk-lib';
const sourceDataOptions: s3_deployment.SourceDataOptions = {
  jsonEscape: false,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3_deployment as s3_deployment

source_data_options = s3_deployment.SourceDataOptions(
    json_escape=False
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.deployment.*;

SourceDataOptions sourceDataOptions = SourceDataOptions.builder()
        .jsonEscape(false)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3.Deployment;

var sourceDataOptions = new SourceDataOptions {
    JsonEscape = false
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

sourceDataOptions := &SourceDataOptions{
	JsonEscape: jsii.Boolean(false),
}
```

## Properties

- `jsonEscape`: boolean = false — Default marker encoding for markers that don't have a `markerEncodings` entry.

  - If `false` (default), the default marker encoding is `MarkerEncoding.LITERAL`.
  - If `true`, the default marker encoding is `MarkerEncoding.UNQUOTED_JSON_VALUE`.

  See `Source.data()` for a full description of the effect of this setting.

  Unless you need fine-grained control over marker encoding, you should
  use `Source.jsonData()` or `Source.yamlData()`.
