the not filled data or data_binary part is a JSON with "type" set to the type that is used with a general message To decode try to read both sides if data = JSON + "type" and "message" set then data is in data_binary else data_binary holds the type on the left side