# AtsJsonCodeWriter Methods

- Package: [Aspire.TypeSystem](/reference/api/csharp/aspire.typesystem.md)
- Type: [AtsJsonCodeWriter](/reference/api/csharp/aspire.typesystem/atsjsoncodewriter.md)
- Kind: `Methods`
- Members: `2`

Provides JSON literal formatting helpers for generated ATS source code.

## ToRelaxedJsonString(JsonNode)

- Name: `ToRelaxedJsonString(JsonNode)`
- Modifiers: `extension`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.TypeSystem/AtsJsonCodeWriter.cs)

Formats a JSON node using relaxed escaping so non-ASCII content remains readable in generated source.

```csharp
public static class AtsJsonCodeWriter
{
    public static string ToRelaxedJsonString(
        this JsonNode value)
    {
        // ...
    }
}
```

## Parameters

- `value` (`JsonNode`)

## ToRelaxedJsonString(string)

- Name: `ToRelaxedJsonString(string)`
- Modifiers: `static`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.TypeSystem/AtsJsonCodeWriter.cs)

Formats a string literal as JSON using relaxed escaping.

```csharp
public static class AtsJsonCodeWriter
{
    public static string ToRelaxedJsonString(
        string value)
    {
        // ...
    }
}
```

## Parameters

- `value` (`string`)
