> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Parse from JSON

> Parses a JSON string into a data object.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Parses a JSON string into a data object. Use this when a value arrives as JSON wrapped up in a single piece of text, for example an API that returns XML with one field holding a JSON string, or a message where the body is a JSON document. It reads the text and turns it back into structured data, so the keys and values inside become regular fields you can read and map.

This documentation describes: [Schema](/schemas/mapper/deserialize-json)

## Fields

This mapper has no settings to configure. Point it at the JSON text you want to parse and it does the rest.

## Sample data

| Field         | Value |
| ------------- | ----- |
| (no settings) |       |

Input:

```json theme={null}
{
    "payload": "{\"sku\":\"A1\",\"name\":\"Wool scarf\",\"price\":19.99,\"inStock\":true}"
}
```

Output:

```json theme={null}
{
    "payload": {
        "sku": "A1",
        "name": "Wool scarf",
        "price": 19.99,
        "inStock": true
    }
}
```

The difference looks small at first glance: the input is one piece of text that happens to contain JSON, while the output is real structured data you can work with field by field.

```json Configuration theme={null}
{
  "prototype": "deserialize-json",
  "parameters": {}
}
```
