Jump to content

how do you extract JSON boolean value


Recommended Posts

I believe you want to wire the Get:Boolean to the output of the Get:from JSON rather than the Get:sub-Item with the way you have the name array wired.

The error is correct in that there is no Boolean in the JSON from the Get:sub-Item. A Boolean value in the JSON would be something like:

"MaximizeOnStart": false

I expect a value of [0] indicates a NULL rather than a logical 0.

Link to comment

Hi Tim,

I tried to change the file input to 'false' instead of '0' and rewire the other wire that you pointed out but it is still the same problem.

When probing the JSON wire it says it is a JSON Object.lvclass ?  instead of Scalar?

getbool2.png

Link to comment
4 hours ago, dahlin said:

OK, when I compared to your JSON file I found the problem: I had written true or false with brackets like this [true] [false].

In JSON, square brackets represent arrays. So, this is an array that contains one Boolean element:

[true]

 

This is an array containing three Boolean elements:

[true, false, true]

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.