# Vision labels get "serialization error" when displaying "document tag" values

**URL:** <https://forum.inductiveautomation.com/t/vision-labels-get-serialization-error-when-displaying-document-tag-values/110750>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [September 18, 2025, 12:19pm UTC](https://forum.inductiveautomation.com/t/vision-labels-get-serialization-error-when-displaying-document-tag-values/110750 "2025-09-18T12:19:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdunn.home](https://avatars.discourse-cdn.com/v4/letter/c/45deac/32.png) [@cdunn.home](https://forum.inductiveautomation.com/u/cdunn.home)\
**Post date:** [September 18, 2025, 12:19pm UTC](https://forum.inductiveautomation.com/t/vision-labels-get-serialization-error-when-displaying-document-tag-values/110750/1 "2025-09-18T12:19:12Z")

</div>

I am performing regressions on various process data to better predict their outputs, thereby making it easier to detect issues with the processes.

I store the regression’s coefficient results in a dictionary because it makes pairing the coefficients and variables very simple and easy to read.

```json
# Coefficients 
{
    "arc_length": 2.9178477439730455,
    "temperature": -0.009490811332843855,
    "intercept": 40.26487761444835,
    "velocity": -0.13768024624063155,
    "i_area": 0.03349375445769801
}

```

Between the calculation of the coefficients and their use in analysis, I currently store them in a tag of type “Document” because the dictionary can be stored and retrieved easily as a whole, at least with scripting it can.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/f/afc9b7e1b52613bc96762dd3934d94487db2b59b.png)

While playing around with the math, I wanted to see the changes occur in real time, so I dropped a couple Label components on a Vision page and bound their Text properties to a couple of the Document tags. Although it worked in the sense that it displayed the json text for the dictionary, which was the aim of adding the labels, it will not allow me to SAVE the window. I get the following error:

```python
SerializationException: Error during serialization for property 'interactionController' on object '[FPMIWindow]GraphTesting_Sawblade (multiball)'
	caused by SerializationException: Error during serialization for property 'propertyAdapters' on object '[DefaultInteractionController]com.inductiveautomation.factorypmi.application.binding.DefaultInteractionController@7bb4fe5b'
	caused by SerializationException: Error during serialization for property 'expression' on object '[ExpressionPropertyAdapter] ---> lblResult 1'
	caused by SerializationException: Error during serialization for property 'children' on object '[FunctionExpression]com.inductiveautomation.ignition.common.expressions.FunctionExpression@27e8c75d'
	caused by SerializationException: Error during serialization for property 'tagListenerDelegate' on object '[BoundTagExpression]com.inductiveautomation.ignition.common.expressions.BoundTagExpression@1f5a190a'
	caused by SerializationException: Error during serialization for property 'tagQualifiedValue' on object '[TagListener]com.inductiveautomation.ignition.common.expressions.TagListener@6c9e1aa2'
	caused by SerializationException: Unable to create clean copy of class com.inductiveautomation.ignition.common.document.ExtendedDocument

```

How does one avoid this serialization issue when reading the value of a Document tag?

I’ve tried casting toStr(), and was originally using the following expression to get line breaks:

```python
"<HTML>"+replace({doc_tag},",","<BR>")

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 18, 2025, 5:48pm UTC](https://forum.inductiveautomation.com/t/vision-labels-get-serialization-error-when-displaying-document-tag-values/110750/2 "2025-09-18T17:48:06Z")

</div>

Use jsonEncode to make a string. Elsewhere, make an actual document type custom prop.

---

<div class="post-metadata">

**Author:** ![cdunn.home](https://avatars.discourse-cdn.com/v4/letter/c/45deac/32.png) [@cdunn.home](https://forum.inductiveautomation.com/u/cdunn.home)\
**Post date:** [September 18, 2025, 7:39pm UTC](https://forum.inductiveautomation.com/t/vision-labels-get-serialization-error-when-displaying-document-tag-values/110750/3 "2025-09-18T19:39:18Z")

</div>

Thanks for answering, Phil!

> Use jsonEncode to make a string.

If you mean “Use jsonEncode to make a string to store in the Document tag”, that did not change the situation.

If you mean “Don’t use expressions with document tags”, well…perhaps not ☹

You probably meant “Use a tag of type “string” instead of type “document”, because using a ‘string’ type works, for sure.

> Elsewhere, make an actual document type custom prop.

I don’t even see “document” as a valid property type in Vision.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/0/d08c01d3505c0ba86073b1b271ba7514e0a52db0.png)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 18, 2025, 7:56pm UTC](https://forum.inductiveautomation.com/t/vision-labels-get-serialization-error-when-displaying-document-tag-values/110750/4 "2025-09-18T19:56:31Z")

</div>

> [@cdunn.home](#):
>
> You probably meant “Use a tag of type “string” instead of type “document”, because using a ‘string’ type works, for sure.

`jsonEncode` is not an expression. It is a scripting function `system.util.jsonEncode()`.

Create a custom Document property on your window's root container to bind to the document tag. Then use a propertyChange script, filtering for the document property, to convert the document using `jsonEncode` and push the returned string into the Label.

---

<div class="post-metadata">

**Author:** ![cdunn.home](https://avatars.discourse-cdn.com/v4/letter/c/45deac/32.png) [@cdunn.home](https://forum.inductiveautomation.com/u/cdunn.home)\
**Post date:** [September 18, 2025, 8:04pm UTC](https://forum.inductiveautomation.com/t/vision-labels-get-serialization-error-when-displaying-document-tag-values/110750/5 "2025-09-18T20:04:46Z")

</div>

Thank you, too, lrose.

Yes, I know it is a python script function 😄 and I did use that to write a string to the document tag, instead of a dict() because I’m a good try-er!

I still cannot select “document” as a data type for a custom property. Please post a pic if you can!

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/3/f3d1b3a634d05617362c429a4f5ffba8dd549db1.png)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [September 18, 2025, 8:54pm UTC](https://forum.inductiveautomation.com/t/vision-labels-get-serialization-error-when-displaying-document-tag-values/110750/6 "2025-09-18T20:54:12Z")

</div>

What version of Ignition are you on?

This is from 8.1.48, not sure if they were added in 8.1.47 or .48

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/1/7173770a1d6c2290730adfebf7764a45c30f6273.png)

---

<div class="post-metadata">

**Author:** ![cdunn.home](https://avatars.discourse-cdn.com/v4/letter/c/45deac/32.png) [@cdunn.home](https://forum.inductiveautomation.com/u/cdunn.home)\
**Post date:** [September 25, 2025, 7:09pm UTC](https://forum.inductiveautomation.com/t/vision-labels-get-serialization-error-when-displaying-document-tag-values/110750/7 "2025-09-25T19:09:00Z")

</div>

Thank you for the pic and sorry for the delay! I was on an all-expense paid vacation to visit some equipment.

The customer is using 8.1.33, which is for certain below 8.1.47.

I still don’t know why expressions choke when reading that tag type; that still feels ‘buggy’, but the workarounds abound, so wagons ho!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 25, 2025, 7:25pm UTC](https://forum.inductiveautomation.com/t/vision-labels-get-serialization-error-when-displaying-document-tag-values/110750/8 "2025-09-25T19:25:07Z")

</div>

> [@cdunn.home](#):
>
> that still feels ‘buggy’

IA didn't intend to support document tags in Vision when that tag type was introduced. (Nothing in Vision natively uses JSON.) I asked for it to be supported as an intermediate type for use with my Integration Toolkit, and @paul-griffith obliged. New features are sometimes buggy. 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 25, 2025, 8:57pm UTC](https://forum.inductiveautomation.com/t/vision-labels-get-serialization-error-when-displaying-document-tag-values/110750/9 "2025-09-25T20:57:36Z")

</div>

I used the same bug you initially reported, @cdunn.home, to justify adding document tag support to Vision in 8.1.44.
