Diode ideality factors much higher than the expected values of 1.0 to 2.0 have been reported in GaN-based p-n junctions. It is shown that moderately doped unipolar heterojunctions as well as metal-semiconductor junctions, in particular the metal contact to p-type GaN, can increase the ideality factor to values greater than 2.0. A relation is derived for the effective ideality factor by taking into account all junctions of the diode structure. Diodes fabricated from a bulk GaN p-n junction and a p-n junction structure with a p-type AlGaN/GaN superlattice display ideality factors of 6.9 and 4.0, respectively. These results are consistent with the theoretical model and the fact that p-type AlGaN/GaN superlattices facilitate the formation of low-resistance ohmic contacts.