JsonProcessingOptions Struct
Define options which can be passed using the method Source.jsonData().
| Source | aws-s3-deployment/lib/source.ts |
|---|---|
| Type last changed |
Example
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
# 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
// 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();
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
};
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
escapeoptionalbooleanescapeoptionalboolescapeoptionalBooleanEscapeoptionalboolEscapeoptional*bool = true #Whether deploy-time values should be treated as values and escaped.
notes
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.