According to the documentation:
The container is available in any traditional Symfony2 controller where you can access the services of the container via the get() shortcut method
So, I have managed to invoke and use JMSSerializer within a Controller by calling:
$serializer = $this->get('serializer');
However, how can I invoke the container in a custom class? The same command fails indicating Fatal Error for calling undefined method get().