  The John-Nirenberg theorem states that functions of bounded mean oscillation
are exponentially integrable. In this article we give two extensions of this
theorem. The first one relates the dyadic maximal function to the sharp maximal
function of Fefferman-Stein, while the second one concerns local weighted mean
oscillations, generalizing a result of Muckenhoupt and Wheeden. Applications to
the context of generalized Poincar\'e type inequalities and to the context of
the $C_p$ class of weights are given. Extensions to the case of polynomial BMO
type spaces are also given.
