added optional dependencies, added get_serializer depending of name or content-type, added tests