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

# Variables in the REST API

In the REST API, [process variables](/user-guide/process-engine/variables) are represented by JSON objects of the following
form:

```json theme={null}
{
  "type": "String",
  "value": "Some value",
  "valueInfo": {}

}
```

The REST API supports the [Value Types](/user-guide/process-engine/variables#supported-variable-values) supported by the process engine.

## Capitalization of Type Names

In the REST API, the type names start with a capital letter, i.e., `String` instead of `string`.

## Serialized and Deserialized Object Values

Object Values are instances of (non primitive) Java types. When working with the REST API, it is
generally advisable to work with the serialized value of a variable. In that case the value is
retrieved from the database and directly returned in the http response. If the client you are
building is not a Java Applications by itself, make sure you use a text-based
[serialization dataformat](/user-guide/process-engine/variables#object-value-serialization) (such as XML or JSON).

<Info>
  To retrieve the serialized form of a variable, use the `deserializeValues=false` GET parameter.
</Info>

## Serialize Variables of type Object in REST API

In the REST API, [process variables](/user-guide/process-engine/variables) of type Object can be serialized in JSON or XML format.

Serializing Object into JSON format:

```json theme={null}
	{
	   "variables": {
	      "aVariable": {
	         "value": "{\"somekey\": \"somevalue\"}",
	         "type": "Object",
	         "valueInfo": {
	            "objectTypeName": "com.camunda.SomeClass",
	            "serializationDataFormat": "application/json"
	         }
	      }
	   }
	}
```

Serializing Object into XML format:

```json theme={null}
	{
	   "variables": {
	      "aVariable": {
	         "value": "<somekey>somevalue</somekey>",
	         "type": "Object",
	         "valueInfo": {
	            "objectTypeName": "com.camunda.SomeClass",
	            "serializationDataFormat": "application/xml"
	         }
	      }
	   }
	}
```
