<?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 Re: Can't unflatten from JSON in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109400#M1184635</link>
    <description>&lt;P&gt;If you install the JSONtext library using VI Package Manager, you'll find a function that can convert your JSON into an array of item names and subclusters.&amp;nbsp; The standard JSON functions in LabVIEW are not that flexible.&lt;/P&gt;</description>
    <pubDate>Sat, 26 Dec 2020 23:43:35 GMT</pubDate>
    <dc:creator>drjdpowell</dc:creator>
    <dc:date>2020-12-26T23:43:35Z</dc:date>
    <item>
      <title>Can't unflatten from JSON</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109380#M1184625</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can anybody with the following JSON string I want to unflatten to LabVIEW cluster/array? An online JSON validator told me the JSON string is valid, but I'm not able to unflatten. I guess the biggest problem are the different cluster names 1st_Cluster to 3rd_Cluster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help is much appreciated.&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;"1st_Cluster":{"pair_id":1039,"price_precision":4,"amount_precision":2,"min_amount":"0.01","max_amount":"-1","min_total":"10","max_total":"-1"},&lt;BR /&gt;"2nd_Cluster":{"pair_id":407,"price_precision":7,"amount_precision":2,"min_amount":"35.42","max_amount":"-1","min_total":"0.005","max_total":"-1"},&lt;BR /&gt;"3rd_Cluster":{"pair_id":937,"price_precision":6,"amount_precision":2,"min_amount":"0.01","max_amount":"-1","min_total":"0.005","max_total":"-1"}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Sat, 26 Dec 2020 18:00:16 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109380#M1184625</guid>
      <dc:creator>Xenia1986</dc:creator>
      <dc:date>2020-12-26T18:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can't unflatten from JSON</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109389#M1184630</link>
      <description>&lt;P&gt;Seemed easy enough to me.&amp;nbsp; You just need to name those 3 clusters in your master cluster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My guess is that some of your inner elements are numbers, and others are strings.&amp;nbsp; So you need to set those types correctly.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Dec 2020 21:07:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109389#M1184630</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2020-12-26T21:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can't unflatten from JSON</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109392#M1184632</link>
      <description>&lt;P&gt;Thanks a lot for your fast help, RavensFan.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to parse all inner elements without any problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The naming of the 3 clusters is another story. The naming and count of clusters in my posted question is just an example. The real data contains hundreds of clusters, all titled differently. The cluster count is changing frequently.&lt;/P&gt;
&lt;P&gt;So, a generic solution is crucial. Can't create controls with hundreds of clusters.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Dec 2020 22:08:55 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109392#M1184632</guid>
      <dc:creator>Xenia1986</dc:creator>
      <dc:date>2020-12-26T22:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can't unflatten from JSON</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109393#M1184633</link>
      <description>&lt;P&gt;Sorry, I didn't write that the real data contains a variable count of clusters with variable labels.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Dec 2020 22:12:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109393#M1184633</guid>
      <dc:creator>Xenia1986</dc:creator>
      <dc:date>2020-12-26T22:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can't unflatten from JSON</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109400#M1184635</link>
      <description>&lt;P&gt;If you install the JSONtext library using VI Package Manager, you'll find a function that can convert your JSON into an array of item names and subclusters.&amp;nbsp; The standard JSON functions in LabVIEW are not that flexible.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Dec 2020 23:43:35 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109400#M1184635</guid>
      <dc:creator>drjdpowell</dc:creator>
      <dc:date>2020-12-26T23:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can't unflatten from JSON</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109407#M1184640</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/121443"&gt;@Xenia1986&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks a lot for your fast help, RavensFan.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to parse all inner elements without any problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The naming of the 3 clusters is another story. The naming and count of clusters in my posted question is just an example. The real data contains hundreds of clusters, all titled differently. The cluster count is changing frequently.&lt;/P&gt;
&lt;P&gt;So, a generic solution is crucial. Can't create controls with hundreds of clusters.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Well that is a completely different problem and more complicated situation than what you asked.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Dec 2020 04:44:59 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109407#M1184640</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2020-12-27T04:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can't unflatten from JSON</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109416#M1184644</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/66277"&gt;@drjdpowell&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;If you install the JSONtext library using VI Package Manager, you'll find a function that can convert your JSON into an array of item names and subclusters.&amp;nbsp; The standard JSON functions in LabVIEW are not that flexible.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Thanks a lot. This plugin made the job. I used the function JSONtext:Get All Object Items.vi to retrieve all the different cluster names into 1 array and their content into another array. Now it's pretty comfortable to build the LV cluster array I need. This library saved my day....thanks again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Dec 2020 06:44:42 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Can-t-unflatten-from-JSON/m-p/4109416#M1184644</guid>
      <dc:creator>Xenia1986</dc:creator>
      <dc:date>2020-12-27T06:44:42Z</dc:date>
    </item>
  </channel>
</rss>

