# 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>

![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-865ee5fd52a96c56ccb1313755b48d4503a910e9%2FjsonEncode-step-1.png?alt=media) ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-8dc67b194bd6bf11e32c9dd15a9fe0aafccab83d%2FjsonEncode-step-2.png?alt=media)

### Result

![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-1ff7905c81afca9611d960da0dc30890c4cadc6c%2FjsonEncode-result-1.png?alt=media)

## Links
