--- title: "serialize map/list()" slug: "basic-serialize-map-or-list" updated: 2026-08-12T12:14:55Z published: 2026-08-12T12:14:55Z canonical: "docs.lobstersoftware.com/basic-serialize-map-or-list" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # serialize map/list() This function can be used to serialize maps and lists. Serialization practically only means that objects are put into a form that allows these objects to be transferred to another place (e.g. another Profile). There, these objects can then be restored (deserialization). The function returns the serialized data. For deserialization the function [deserialize map/list()](/v1/docs/en/basic-deserialize-map-or-list) can be used. **NOTE:** The concept is not intended for mass data. ## Parameters | Parameter | Description | | --- | --- | | a | Name of the map or list to be serialized. **NOTE:** If no value is specified (**b** can also remain empty then), the objects with prefix "autoserialize_" are used, see examples below. The function then has no return value and the variable VAR_AUTOSERIALIZE_DATA (if defined) already contains the serialized data right after the function has been executed and not only after Phase 3. | | b | Value *map* if **a** is a map and value *list* if **a** is a list. | ## Examples Please import the following two profiles and set them [active](/docs/en/profiles--entry-tab-1): [Profile-serialize.pak](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/Profile-serialize.pak), [Profile-deserialize.pak](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/Profile-deserialize.pak). In profile *serialize*, the map *mymap* (with one entry) is serialized. The serialization data is stored in variable *var__SERIALIZED_DATA*. The profile then calls the second profile *deserialize* via Message. In the second profile, the variable MSG_CALL_var__SERIALIZED_DATA (passed via Message from profile *serialize*) is read, the deserialization is executed and the entry is read from the map. ### Automatic serialization/deserialization Serialization and deserialization can also be carried out automatically. If a new profile is created, the system variable VAR_AUTOSERIALIZE_DATA is automatically created (otherwise please create it manually in both profiles). If you use the prefix *autoserialize_* in names of maps or lists, they are automatically serialized (in the source profile) and deserialized (in the target profile). Please import the following two profiles and set them active: [Profile-auto_serialize.pak](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/Profile-auto_serialize.pak), [Profile-auto_deserialize.pak](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/Profile-auto_deserialize.pak). > [!WARNING] > **IMPORTANT:** > > If you use automatic serialization and deserialization, you do not have to create the described system variable in either the calling or the called profile. In addition, the *MSG_CALL_* prefix does not have to be used in the subsequent profile and no explicit deserialization has to be performed. You therefore always have direct and immediate access to automatically serialized maps and lists in the subsequent profile. The same applies to Subprofile calls. For using autoserialization/autodeserialization in workflows, see section [Variables (workflows)](/v1/docs/en/mod-workflow--entry-tab-2). #### Time of autoserialization Automatic serialization takes place at the end of Phase 3 (or in the event of an error when phase 3 is aborted) or after each record if the option "Enter output channels for each record" (see [Extended (Phase 2)](/v1/docs/en/profiles--tab-3-advanced)**)** is set. In case the system variable VAR_AUTOSERIALIZE_DATA is to be filled immediately, see parameter **a**. > [!WARNING] > **IMPORTANT:** > > When calling functions "start new workflow()", "fire workflow-event()", "add/set workflow variable()" and "call sub profile for Source tree()", autoserialization is done immediately and not after Phase 3. A profile is the central configuration unit in the Lobster Data Platform. It receives data, processes it, and forwards it. Configuration is done graphically, with no programming required. Mapping: Rules transfer the data from the source structure to the target structure. This is the core of the profile. Profile that is embedded in another profile and called as a substep. Subprofiles allow processing logic to be reused. The parent profile passes data to the subprofile and optionally receives results back. Structured representation of the input data in Phase 2. The source tree is generated by parsing the input file and forms the basis for the mapping in Phase 3.