Boolean values: Difference between revisions

Content deleted Content added
Peak (talk | contribs)
jq
Peak (talk | contribs)
mv jq
Line 544: Line 544:


False is <tt>0</tt>, true is <tt>1</tt>. This is an [http://keiapl.info/anec/#Maple advantage].
False is <tt>0</tt>, true is <tt>1</tt>. This is an [http://keiapl.info/anec/#Maple advantage].

=={{header|jq}}==

<tt>true</tt> and <tt>false</tt> are the only entities of type "boolean":

<tt>
$ jq type
true
"boolean"
false
"boolean"
</tt>

The above shows the jq command invocation, followed by alternating lines of input and output.

jq's logical operators, however, do not require boolean inputs. In brief, <tt>false</tt> and <tt>null</tt> are both regarded as false, and all other JSON entities are regarded as <tt>true</tt>.


=={{header|Java}}==
=={{header|Java}}==