# JsonNull

An object which serializes to the JSON `null` literal, and which can safely be passed across languages where `undefined` and `null` are not different.

Implements: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html)
Obtainable from: JsonNull.INSTANCE

- Source: [`core/lib/token.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/core/lib/token.ts#L251)
- Type last changed: v2.70.0 · 22 Mar 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const jsonNull = cdk.JsonNull.INSTANCE;
```

Python:

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

json_null = cdk.JsonNull.INSTANCE
```

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.*;

JsonNull jsonNull = JsonNull.INSTANCE;
```

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;

var jsonNull = JsonNull.INSTANCE;
```

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 cdk "github.com/aws/aws-cdk-go/awscdk"

jsonNull := cdk.JsonNull_INSTANCE()
```

## Properties

- `creationStack`: string[] — The creation stack of this resolvable which will be appended to errors thrown during resolution.

  This may return an array with a single informational element indicating how
  to get this property populated, if it was skipped for performance reasons.

- `INSTANCE`: [JsonNull](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.JsonNull.html) (static) — The canonical instance of `JsonNull`.

## Methods

- `resolve(_ctx: IResolveContext): any` — Produce the Token's value at resolution time.

- `toJSON(): any` — Obtains the JSON representation of this object (`null`).

- `toString(): string` — Obtains the string representation of this object (`'null'`).
