Unpack json before checking the message