<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Flatten to JSON Failing? Bug? in G Web Development Software</title>
    <link>https://ni.lithium.com/t5/G-Web-Development-Software/Flatten-to-JSON-Failing-Bug/m-p/4232073#M264</link>
    <description>&lt;P&gt;I have a type definition consisting of a cluster which contains an enum.&amp;nbsp; If I wire an instance of the type definition to the "Flatten to JSON" VI it gives me the error, "Cluster elements conflict because the wire and the terminal are clusters of different sizes. Wire size: TEST.gtype, Terminal size: cluster with 0 elements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I remove the enum from the type def's cluster and replace it with a ring, then the "Flatten to JSON" VI has no problem.&amp;nbsp; Booleans, arrays, listboxes, numerics all have no problem - just the enum type.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this a G Web bug? If enums are not allowed in type definitions for some reason, then it should not be possible to place them in the type def.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If a ring is accepted by the "Flatten to JSON" VI then why would not an enum also be accepted?&lt;/P&gt;</description>
    <pubDate>Fri, 20 May 2022 21:54:20 GMT</pubDate>
    <dc:creator>jvon20</dc:creator>
    <dc:date>2022-05-20T21:54:20Z</dc:date>
    <item>
      <title>Flatten to JSON Failing? Bug?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Flatten-to-JSON-Failing-Bug/m-p/4232073#M264</link>
      <description>&lt;P&gt;I have a type definition consisting of a cluster which contains an enum.&amp;nbsp; If I wire an instance of the type definition to the "Flatten to JSON" VI it gives me the error, "Cluster elements conflict because the wire and the terminal are clusters of different sizes. Wire size: TEST.gtype, Terminal size: cluster with 0 elements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I remove the enum from the type def's cluster and replace it with a ring, then the "Flatten to JSON" VI has no problem.&amp;nbsp; Booleans, arrays, listboxes, numerics all have no problem - just the enum type.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this a G Web bug? If enums are not allowed in type definitions for some reason, then it should not be possible to place them in the type def.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If a ring is accepted by the "Flatten to JSON" VI then why would not an enum also be accepted?&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 21:54:20 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Flatten-to-JSON-Failing-Bug/m-p/4232073#M264</guid>
      <dc:creator>jvon20</dc:creator>
      <dc:date>2022-05-20T21:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Flatten to JSON Failing? Bug?</title>
      <link>https://ni.lithium.com/t5/G-Web-Development-Software/Flatten-to-JSON-Failing-Bug/m-p/4232077#M265</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;If enums are not allowed in type definitions for some reason, then it should not be possible to place them in the type def.&amp;nbsp;
&lt;P&gt;If a ring is accepted by the "Flatten to JSON" VI then why would not an enum also be accepted?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The Flatten to JSON VI does not support enums in G Web or in LabVIEW (although the LabVIEW error message is definitely clearer):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MilanR_0-1653087295679.png" style="width: 400px;"&gt;&lt;img src="https://ip1.i.lithium.com/69ee7210502cc211132a9ff6c65715c6ec5ace26/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303332383069454645314341353437334232353738412f696d6167652d73697a652f6d656469756d3f763d76322670783d343030" role="button" title="MilanR_0-1653087295679.png" alt="MilanR_0-1653087295679.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MilanR_1-1653087374664.png" style="width: 400px;"&gt;&lt;img src="https://ip1.i.lithium.com/9e8561a864c6c127f9245712025c7572611df631/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303332383169444445373433423531324641453442382f696d6167652d73697a652f6d656469756d3f763d76322670783d343030" role="button" title="MilanR_1-1653087374664.png" alt="MilanR_1-1653087374664.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One option to consider would be creating a VI that can format the cluster into a format that is supported by the Flatten to JSON and Unflatten from JSON nodes. The JSON nodes try to only support values that are well represented in JSON which only supports a &lt;A href="https://www.json.org/json-en.html" target="_self"&gt;limited set of types&lt;/A&gt;&amp;nbsp;in the specifications.&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 23:15:47 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/G-Web-Development-Software/Flatten-to-JSON-Failing-Bug/m-p/4232077#M265</guid>
      <dc:creator>MilanR</dc:creator>
      <dc:date>2022-05-20T23:15:47Z</dc:date>
    </item>
  </channel>
</rss>

