# system.util.jsonEncode(system.tag.getConfiguration()) exceeds maximum recursion depth / why can't we export MQTT Tag Configuration?

**URL:** <https://forum.inductiveautomation.com/t/system-util-jsonencode-system-tag-getconfiguration-exceeds-maximum-recursion-depth-why-cant-we-export-mqtt-tag-configuration/59328>\
**Category:** Ignition\
**Created:** [May 7, 2022, 5:37pm UTC](https://forum.inductiveautomation.com/t/system-util-jsonencode-system-tag-getconfiguration-exceeds-maximum-recursion-depth-why-cant-we-export-mqtt-tag-configuration/59328 "2022-05-07T17:37:04Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 7, 2022, 6:50pm UTC](https://forum.inductiveautomation.com/t/system-util-jsonencode-system-tag-getconfiguration-exceeds-maximum-recursion-depth-why-cant-we-export-mqtt-tag-configuration/59328/2 "2022-05-07T18:50:22Z")

</div>

This is unexpected but a known issue that we've already got logged.

The workaround on the ticket is to cast each of the dictionaries returned in the `getConfiguration` result to string before passing to `system.util.jsonEncode`.

```auto
result = system.tag.getConfiguration(PathToTag)
print system.util.jsonEncode(str(result[0]))

```

> [@joyja](#):
>
> I know I can do this with the Tag Export tool for regular tags, but I can’t export MQTT tags with that so I’m resorting to this.

What are you hoping to achieve in the end? You aren't going to be able to create or modify MQTT tags by importing whatever you manage to export. They are managed by the MQTT modules.

---

_[View the full topic](https://forum.inductiveautomation.com/t/system-util-jsonencode-system-tag-getconfiguration-exceeds-maximum-recursion-depth-why-cant-we-export-mqtt-tag-configuration/59328)._
