Added support for Ratio

Noticed this was missing when moving around between various json encoders.