What's the use of double boolean variables? : <p>I am looking at a JSON dataset from an API and I see stuff like this:</p>

<pre><code>   "lights_on":1,
   "lights_off":0,
   "doors_locked":0,
   "doors_unlocked":1,
   "sensors_tripped":0,
   "sensors_not_tripped":1
</code></pre>

<p>Is it just me, or is it kinda silly to have a variable for both states of a boolean? in this example, wouldn't it make more sense to check the value of  <code>lights_on</code> and if <code>0</code> it must be <code>false</code>, if <code>1</code> it must be <code>true</code></p>

<p>What is the advantage of the above JSON data set with variables for both the <code>true</code> and <code>false</code> states and should I be using this in my programs?</p>
