src/Utils.php
public static function unserializeMessagePayload($payload)
    {
        $message = json_decode($payload, true);
        if (json_last_error() === JSON_ERROR_NONE) {
            return $message;
        }

        return $payload;
    }
public static function unserializeMessagePayload($payload)
    {
        $message = json_decode($payload, true);
        if (json_last_error() === JSON_ERROR_NONE) {
            return $message;
        }

        return $payload;
    }
public static function unserializeMessagePayload ( $ payload ) { $ message = json_decode ( $ payload , true ) ; if ( json_last_error ( ) === JSON_ERROR_NONE ) { return $ message ; } return $ payload ; }
Unserialize the message payload.

@param string $payload

@return mixed
Unserialize the message payload .