# Saving context data to the file-system， saving map type data will fail

**URL:** https://discourse.nodered.org/t/saving-context-data-to-the-file-system-saving-map-type-data-will-fail/86510
**Category:** General
**Created:** [18 March 2024 05:53 UTC](https://discourse.nodered.org/t/saving-context-data-to-the-file-system-saving-map-type-data-will-fail/86510 "2024-03-18T05:53:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![julaoshi](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@julaoshi](https://discourse.nodered.org/u/julaoshi)
#### Post date: [18 March 2024 05:53 UTC](https://discourse.nodered.org/t/saving-context-data-to-the-file-system-saving-map-type-data-will-fail/86510/1 "2024-03-18T05:53:27Z")

</div>

setting

```auto
contextStorage: {
   default: {
       module: "localfilesystem"
   }
}

```

After enabling file persistence, saving map type data will fail, while other types can succeed. Why is this? How to solve it  
开启文件持久化后，保存map类型的数据会失败，其他类型可以成功，这是为什么？该如何解决呢

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [18 March 2024 08:01 UTC](https://discourse.nodered.org/t/saving-context-data-to-the-file-system-saving-map-type-data-will-fail/86510/2 "2024-03-18T08:01:06Z")

</div>

This stackoverflow entry may help you serialise the map type data so you can save it to file context [serialise map data at DuckDuckGo](https://duckduckgo.com/?q=serialise+map+data&ia=web)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [16 June 2024 08:01 UTC](https://discourse.nodered.org/t/saving-context-data-to-the-file-system-saving-map-type-data-will-fail/86510/3 "2024-06-16T08:01:48Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
