# Get a JSON as a String

## Overview

This procedure converts a JSON object to its text (string) representation. The resulting string is a properly formatted JSON string that can be used for storage, transmission, or display purposes. Non-ASCII characters are preserved in the output (not escaped).

## Input

| Concept | Type | Description                     | Required | Default |
| ------- | ---- | ------------------------------- | -------- | ------- |
| json    | json | The JSON object to be converted | Yes      | N/A     |

## Output

| Concept | Description                                  |
| ------- | -------------------------------------------- |
| string  | The string representation of the JSON object |

## Examples

### 1. Converting a simple JSON object to string

This example converts a JSON object to its string representation.

```kog
get the json
get the json as a string
```

### 2. Converting a JSON with special characters

This example demonstrates converting a JSON object with special characters (quotes and percentages) to a string. The result would be: `{"TermsCode": "38", "Description": "0.5% 10 NET 45"}`

```kog
the term is "{\"TermsCode\": \"38\", \"Description\": \"0.5% 10 NET 45\"}"
get the term as a json
get the term as a string
```

### 3. Converting an empty JSON to string

This example shows converting an empty JSON object to its string representation "{}".

```kog
create an empty json
use the above as the best json
the best json
get the best json as a string
```

### 4. Converting a complex JSON structure

This example demonstrates working with a nested JSON structure with multiple levels that can be converted to a string.

```kog
the AddressInformation is '{"BillingAddress": {"Name": "Brown Integrated Logistics"}}'
get the AddressInformation as a json
```
