Fix boolean extraction

Python2 and Python3 have different json packages.
Added code to pull out boolean values from either type of message.