JSON Toolkit for LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in JSON Toolkit v2012-12-20: Error when using (complex) Strict TypeDefs

Hi,

while playing around with the JSON toolkit I've run into an issue using strict typedefs.

The problem can be bypassed in two ways:

1. Right click the indicator > remove the association with the strict typedef (on german Labview it's: Von Typdefinition trennen)

2. Or the better way: Change the strict typedef to a typedef (if possible)

Than a valid JSON string is generated.

Attached is a zip file containing 2 VIs and the strict typedef.

- In the test_encode_decode.vi no typedef is used => works

- In the test_encode_decode_ERROR.vi the included strict typedef is used => Error

Regards,

Bastian

0 Kudos
Message 1 of 2
(7,308 Views)

Hi Bastian,

Unfortunately, the reason for this is that the method used in the LabVIEW Type to JSON Tree VI for scanning LabVIEW Arrays of Clusters relies on the IndexVIs Property node and the IndexVals Property Node. The IndexVIs property node is needed to make sure the index is visible (thereby usable) and the IndexVals property node is needed to cycle through the indices. This is definitely not ideal or fast but the only solution I could find at the time.

Capture.PNG

As a consequence of those property node behaviors, strict type definitions cannot be used.

However the two solutions you gave work! Either disconnect the type def or use a non-strict type definition and everything should work okay


Milan
0 Kudos
Message 2 of 2
(5,685 Views)