---
title: "Convert Json To Expression"
method: POST
path: "/variables/convert-json-to-expression"
tags: ["variables"]
---

# Convert Json To Expression

`POST /variables/convert-json-to-expression`

Convert a JSON-serialized PyBaMM symbol back to an expression string.

This reconstructs a PyBaMM expression string from the JSON representation.
The resulting expression can be evaluated back to the same symbol.

Parameters
----------
request : JsonToExpressionRequest
    Request body containing the JSON-serialized PyBaMM symbol

Returns
-------
JsonToExpressionResponse
    Response with the expression string

## Request body

- JsonToExpressionRequest — Request body for converting JSON-serialized PyBaMM symbol to string.
  - `value` object, required

## Response `200`

Successful Response

- JsonToExpressionResponse — Response body with PyBaMM expression string.
  - `expression` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/ionworks/apis/fastapi.md) · [All operations](https://skmtc.dev/ionworks/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ionworks/fastapi/revisions/7337a3cbdaf2/schema)
