# JsonProcessingOptions

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

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

- 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#L85)
- 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 jsonProcessingOptions: s3_deployment.JsonProcessingOptions = {
  escape: 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

json_processing_options = s3_deployment.JsonProcessingOptions(
    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.*;

JsonProcessingOptions jsonProcessingOptions = JsonProcessingOptions.builder()
        .escape(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 jsonProcessingOptions = new JsonProcessingOptions {
    Escape = 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"

jsonProcessingOptions := &JsonProcessingOptions{
	Escape: jsii.Boolean(false),
}
```

## Properties

- `escape`: boolean = true — Whether deploy-time values should be treated as values and escaped.

  The default behavior (`true`) treats deploy-time values as values and
  serializes them accordingly.

  The only reason to set this to `false` would be if all Token values are
  full JSON strings that you want to include into your JSON content as-is. You
  must use `Token.asNumber()` on those to serialize them into an unquoted
  context. This should be an exceedingly rare use case and hence it
  is not the default.
