JSON values 1 or 0 - int or boolean JSON values 1 or 0 - int or boolean json json

JSON values 1 or 0 - int or boolean


The values true and false are actual boolean values, the rest are integers. See http://json.org/ for more.


JSON is a format for transferring data.
It has no notion of equality.

JSON parsers treat booleans and numbers as distinct types.


I prefer using 0/1 instead of true/false, because 0/1 consume only 1 byte while true/false consume 4/5 bytes.