> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/conversion/jsonencode.md).

# jsonEncode

## Description

Encodes an object format to a [JSON](https://www.json.org/json-en.html) string representation.

See 'jsonDecode' function for the json decoding function.

## Input / Parameter

| Name   | Description                                       | Input Type | Default | Options | Required |
| ------ | ------------------------------------------------- | ---------- | ------- | ------- | -------- |
| object | The value to be encoded.                          | Object     | -       | -       | Yes      |
| indent | Spacing indentation to be included in the output. | Number     | 0       | -       | No       |

## Output

| Description                                                                  | Output Type |
| ---------------------------------------------------------------------------- | ----------- |
| Returns the [JSON](https://www.json.org/json-en.html) string representation. | String/Text |

## Callback

N/A

## Video

Coming Soon.

## Example

User want to encode from string to json.

### Step

1. Call the function.\
   Name : Lili\
   Gender : F<br>

![](/files/SHLAtahkqX8dSJTPaJLB) ![](/files/bF5T6ZuuSck0E3UEtxz1)

### Result

![](/files/SeT6R5CNr2a9h0YcaFTc)

## Links
