From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

JDP Science Tools

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically serializing to JSON and back to Flattened String

Control Variant to JSON to Flattened String.png

 

Hi,

 

I'm trying to programmatically serialize typedef'd clusters to and from JSON using JSONText. It serializes fine, but on the way back in I can't manage to reconstitute it as a flattened string.  I think the problem is that I can only retrieve the prototype cluster (for type and defaults) as a variant.

 

In my example, I want the bools 1,2, and 3 to be true, but 3 resists all my efforts.

 

Am I misusing the library? Is it not possible?

 

 

0 Kudos
Message 1 of 3
(1,737 Views)

I solved my problem by piping the variant output of From JSON Text.vim into and out of the defining control. If anyone knows an easier way, please let me know.

 

Control Variant to JSON to Flattened String - solution.png

0 Kudos
Message 2 of 3
(1,700 Views)

It isn't clear to me what you trying to do.  Why are you interested in these booleans?  Setting your cluster is trivially easy, as you show.  What more are you needing?

0 Kudos
Message 3 of 3
(1,684 Views)