We have performed detailed $^{57}$Fe Mossbauer spectroscopy measurements on Ba$_{0.78}$K$_{0.22}$Fe$_2$As$_2$ and BaFe$_{2-x}$Ni$_x$As$_2$ single crystal mosaics showing antiferromagnetic ordering below $T_N$ with superconductivity below $T_C$. Analysis of the Mossbauer spectra shows a decrease in the magnetic hyperfine (hf) field but no change in the magnetic volume fraction below $T_C$. This clearly indicates the coexistence of magnetism and superconductivity in these compounds. The decrease in the magnetic hf field below $T_C$ depends on the difference between $T_N$ and $T_C$, being the largest for $T_N$ close to $T_C$. Two different explanations for this observation are given. We also find that the non-magnetic volume fraction below $T_N$ correlates with the Ni doping $x$, being large for high $T_C$ and small for high $T_N$.