> For the complete documentation index, see [llms.txt](https://cooffeerequireds.gitbook.io/skript-gson/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cooffeerequireds.gitbook.io/skript-gson/foundations/serialization.md).

# Serialization

Official docs of Skript-gson

Examples of data serialization

{% hint style="info" %}
Allows you to convert a JsonElement (json) to a list variable
{% endhint %}

{% tabs %}
{% tab title="plain serialization" %}

```vbnet
options:
    storage: json from file "plugins/YourAwesome/storage.json"
    
on load:
    map json from {@storage} to {_example::*}
    '#Example 1
     broadcast {_example::*}
```

{% endtab %}

{% tab title="some values" %}
**Json** f**Ile**

```json
{
    "playerdata": {
        "name": "player",
        "health": 20,
        "some": "Example",
        "array": ["somedataHere", false, true, null]
    }
}
```

**Example**

```vbnet
options:
    storage: json from file "plugins/YourAwesome/storage.json"
    
on load:
    map json from {@storage} to {_example::*}
    '#Example 2
     broadcast {_example::playerdata::*}
    '# Example 3
     loop {_example::*}:
        broadcast loop-index
        broadcast loop-value
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
The **Example 1** will print out only first key of JsonElement (Json), otherwise the **Example 2** will print out everything from the list.\
The **Example 3** looping everything inside the list and then printint out.
{% endhint %}
